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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Henderson <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:afd6aa80b373fdf4de6bd3ac3c5f099634ac26e2

commit r16-3149-gafd6aa80b373fdf4de6bd3ac3c5f099634ac26e2
Author: Richard Henderson <richard.hender...@linaro.org>
Date:   Thu Aug 7 22:48:52 2025 +0000

    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.

Reply via email to