Hi Richard, > -----Original Message----- > From: Richard Sandiford <richard.sandif...@arm.com> > Sent: 22 January 2021 13:09 > To: Kyrylo Tkachov via Gcc-patches <gcc-patches@gcc.gnu.org> > Cc: Kyrylo Tkachov <kyrylo.tkac...@arm.com> > Subject: Re: [PATCH] tree-ssa-mathopts: Use proper poly_int64 comparison > with param_avoid_fma_max_bits [PR 98766] > > Kyrylo Tkachov via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > > diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c > > index > d6201d3cb943e145720c18fbf3aadd853fd87b44..800815b855c759075b4326 > 361cc4db7183f1c543 100644 > > --- a/gcc/tree-ssa-math-opts.c > > +++ b/gcc/tree-ssa-math-opts.c > > @@ -3252,8 +3252,8 @@ convert_mult_to_fma (gimple *mul_stmt, tree > op1, tree op2, > > > > bool check_defer > > = (state->m_deferring_p > > - && (tree_to_shwi (TYPE_SIZE (type)) > > - <= param_avoid_fma_max_bits)); > > + && known_le (tree_to_poly_int64 (TYPE_SIZE (type)), > > + param_avoid_fma_max_bits)); > > I'd suggest maybe_le here instead. I.e. instead of the current > “don't do this if the vector length is X” have “don't do this if > the vector length might be X”. > > OK from my point of view with that change.
Thanks. Pushed with that change after a bootstrap and test on aarch64-none-linux-gnu. Kyrill > > Thanks, > Richard > > > bool defer = check_defer; > > bool seen_negate_p = false; > > /* Make sure that the multiplication statement becomes dead after
math-opts.patch
Description: math-opts.patch