]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix condition accepted by mov<ALLI>cc
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 8 Aug 2025 01:01:26 +0000 (01:01 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 11 Aug 2025 23:25:10 +0000 (23:25 +0000)
commitbc11cbff9e648fdda2798bfa2d7151d5cd164b87
tree15a332ec9b35d24ab2d376283f84f7031ce7734e
parentafd6aa80b373fdf4de6bd3ac3c5f099634ac26e2
aarch64: Fix condition accepted by mov<ALLI>cc

Reject QI/HImode conditions, which would require extension in
order to compare.  Fixes

z.c:10:1: error: unrecognizable insn:
   10 | }
      | ^
(insn 23 22 24 2 (set (reg:CC 66 cc)
        (compare:CC (reg:HI 128)
            (reg:HI 127))) "z.c":6:6 -1
     (nil))
during RTL pass: vregs

gcc:
* config/aarch64/aarch64.md (mov<ALLI>cc): Accept MODE_CC
conditions directly; reject QI/HImode conditions.

gcc/testsuite:
* gcc.target/aarch64/cmpbr-3.c: New.
* gcc.target/aarch64/ifcvt_multiple_sets_rewire.c: Simplify
test for csel by ignoring the actual registers used.
gcc/config/aarch64/aarch64.md
gcc/testsuite/gcc.target/aarch64/cmpbr-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/ifcvt_multiple_sets_rewire.c