diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2025-08-07 22:48:52 +0000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-08-11 23:25:10 +0000 |
commit | afd6aa80b373fdf4de6bd3ac3c5f099634ac26e2 (patch) | |
tree | 8a7269af5a8913ac7d933065b694017db50ffdd7 /gcc/rust | |
parent | 2af897e11b358fccb978e3a96b2899ce193bcd25 (diff) | |
download | gcc-afd6aa80b373fdf4de6bd3ac3c5f099634ac26e2.zip gcc-afd6aa80b373fdf4de6bd3ac3c5f099634ac26e2.tar.gz gcc-afd6aa80b373fdf4de6bd3ac3c5f099634ac26e2.tar.bz2 |
aarch64: CMPBR branches must be invertable
Restrict the immediate range to the intersection of LT/GE and GT/LE
so that cfglayout can invert the condition to redirect any branch.
gcc:
PR target/121388
* config/aarch64/aarch64.cc (aarch64_cb_rhs): Restrict the
range of LT/GE and GT/LE to their intersections.
* config/aarch64/aarch64.md (*aarch64_cb<INT_CMP><GPI>): Unexport.
Use cmpbr_imm_predicate instead of aarch64_cb_rhs.
* config/aarch64/constraints.md (Uc1): Accept 0..62.
(Uc2): Remove.
* config/aarch64/iterators.md (cmpbr_imm_predicate): New.
(cmpbr_imm_constraint): Update to match aarch64_cb_rhs.
* config/aarch64/predicates.md (aarch64_cb_reg_i63_operand): New.
(aarch64_cb_reg_i62_operand): New.
gcc/testsuite:
PR target/121388
* gcc.target/aarch64/cmpbr.c (u32_x0_ult_64): XFAIL.
(i32_x0_slt_64, u64_x0_ult_64, i64_x0_slt_64): XFAIL.
* gcc.target/aarch64/cmpbr-2.c: New.
Diffstat (limited to 'gcc/rust')
0 files changed, 0 insertions, 0 deletions