https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78794
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Uroš Bizjak from comment #5) > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index 1cd1cd8..f718040 100644 > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -3417,7 +3417,10 @@ dimode_scalar_chain::compute_convert_gain () > || GET_CODE (src) == AND) > { > gain += ix86_cost->add; > - if (CONST_INT_P (XEXP (src, 0))) > + /* Additional gain for andnot. */ > + if (GET_CODE (XEXP (src, 0)) == NOT) > + gain += ix86_cost->add; > + else if (CONST_INT_P (XEXP (src, 0))) Shouldn't that take into account whether there is a scalar andn or not? I.e. only bump the gain if !TARGET_BMI?