[Bug tree-optimization/114324] [13/14 Regression] AVX2 vectorisation performance regression with gfortran 13/14

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 14 10:37:22 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114324

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the missed feature is to implement swapping operands of a MINUS_EXPR
during SLP discovery by introducing a conditional negate (for example
by multiplying with { 1, -1 } or with two_operator negate, "nop" and blend).

Note that with GCC 12 and the +- mixed op we ae able to use vaddsubpd,
that's in the end likely the perfect code gen for the testcase.  I'm not
sure it's easy to get back to that with the "more optimized" scalar IL.

I'll note the negate could be also consumed by the constant in the
multiplication.


More information about the Gcc-bugs mailing list