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

            Bug ID: 101207
           Summary: [12 Regress] gcc.dg/vect/vect-strided-mult.c fails
                    after SLP improvements
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64-linux-gnu

So after the recent SLP improvements gcc.dg/vect/vect-strided-mult.c started to
fail on aarch64-linux-gnu .

There was one place where SLP happens where it did not happen before with:
....
|| ires[i].a != iarr[i].b - iarr[i].a
....
|| ires[i].b != iarr[i].b + iarr[i].a

Which produces in optimized:
  vect__22.39_7 = MEM <vector(2) unsigned int> [(unsigned int *)_101];
  _46 = BIT_FIELD_REF <vect__22.39_7, 32, 32>;
  _8 = BIT_FIELD_REF <vect__22.39_7, 32, 0>;
  _24 = _8 - _46;
...
  _47 = .REDUC_PLUS (vect__22.39_7);

In the assembly code:
-       ldr     d0, [x1]
-       umov    w8, v0.s[1]
-       fmov    w5, s0
-       sub     w5, w5, w8
....
-        addp    v0.2s, v0.2s, v0.2s

Where before we did:
+       ldp     w6, w3, [x1]
+       sub     w8, w3, w6
....
+       add     wN, w3, w6

The add should be ok but the subtraction I think is failing.

Reply via email to