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

--- Comment #3 from Igor Shevlyakov <ishevlyakov at gcc dot gnu.org> ---
Thanks, Andrew. I can confirm the aarch64 failure with your testcase on
Compiler Explorer (-O2 -ffast-math -march=armv8.3-a, compiled and run
there):

  GCC 12.5.0, 14.3.0, 15.2.0   pass
  GCC 16.1.0                   abort
  trunk                        abort

In f, 15.2 feeds the loaded x[i] and y[i] straight into

        fcmla   v29.2d, v30.2d, v31.2d, #180
        fcmla   v29.2d, v30.2d, v31.2d, #270

16.1 first swaps the real and imaginary halves of both inputs

        ext     v31.16b, v31.16b, v31.16b, #8
        ext     v30.16b, v30.16b, v30.16b, #8

and trunk broadcasts the imaginary part of both instead

        dup     v31.2d, v31.d[1]
        dup     v30.2d, v30.d[1]

so this is a 16/17 regression in the SLP complex pattern matching,
independent of the GCN expander bugs. I'm bisecting it with an aarch64
cross compiler.

Since it affects aarch64 and is a regression, I think it deserves its own
PR, so that this one can be closed with your GCN patch. I'll file it
unless you'd rather do it.

Reply via email to