[Bug target/100200] [10/11/12 Regression] UB evaluating aarch64_plus_immediate predicate

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 27 13:46:58 GMT 2021


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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:618ae596ebcd1de03857d20485d1324931852569

commit r12-160-g618ae596ebcd1de03857d20485d1324931852569
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 27 15:46:16 2021 +0200

    aarch64: Fix UB in the compiler [PR100200]

    The following patch fixes UBs in the compiler when negativing
    a CONST_INT containing HOST_WIDE_INT_MIN.  I've changed the spots where
    there wasn't an obvious earlier condition check or predicate that
    would fail for such CONST_INTs.

    2021-04-27  Jakub Jelinek  <jakub@redhat.com>

            PR target/100200
            * config/aarch64/predicates.md (aarch64_sub_immediate,
            aarch64_plus_immediate): Use -UINTVAL instead of -INTVAL.
            * config/aarch64/aarch64.md (casesi, rotl<mode>3): Likewise.
            * config/aarch64/aarch64.c (aarch64_print_operand,
            aarch64_split_atomic_op, aarch64_expand_subvti): Likewise.


More information about the Gcc-bugs mailing list