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

            Bug ID: 118956
           Summary: [15 regression]
                    gcc.target/aarch64/sve/pred-not-gen-[14].c fail after
                    r15-268-g9dbff9c05520a74e
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, testsuite-fail
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*-*-*

gcc.target/aarch64/sve/pred-not-gen-1.c and
gcc.target/aarch64/sve/pred-not-gen-4.c started failing with
r15-268-g9dbff9c05520a74e:

FAIL: gcc.target/aarch64/sve/pred-not-gen-1.c scan-assembler-not \\tbic\\t
FAIL: gcc.target/aarch64/sve/pred-not-gen-1.c scan-assembler-times
\\tnot\\tp[0-9]+\\.b, p[0-9]+/z, p[0-9]+\\.b\\n 1
FAIL: gcc.target/aarch64/sve/pred-not-gen-4.c scan-assembler-not \\tbic\\t
FAIL: gcc.target/aarch64/sve/pred-not-gen-4.c scan-assembler-times
\\tnot\\tp[0-9]+\\.b, p[0-9]+/z, p[0-9]+\\.b\\n 1

We can reclaim the BIC to NOT conversion in post-reload late-combine by
tweaking the patterns.  I have a patch for that part.  However, we then end up
with duplicate comparisons.  We'd need a post-split cse patch, such as:

          ...
          NEXT_PASS (pass_split_after_reload);
          NEXT_PASS (pass_postreload_cse);
          ...

in order to remove the duplicates and recover the intended code.  However,
adding a new pass seems too invasive for GCC 15.

Replacing one comparison and two logic ops with two comparisons and one logic
op isn't necessarily a win, although it does reduce the latency for uses of the
non-inverted comparison.  I'm therefore not sure it's worth applying the
pattern patch without the follow-on CSE.

We might need to XFAIL these tests for GCC 15 and revisit for GCC 16.

Reply via email to