aarch64: Fix UB in the compiler [PR100200]
authorJakub Jelinek <jakub@redhat.com>
Tue, 27 Apr 2021 13:46:16 +0000 (15:46 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 27 Apr 2021 13:46:16 +0000 (15:46 +0200)
commit618ae596ebcd1de03857d20485d1324931852569
tree6a5e1b4c22b78af72394a525e6a8ca5b17b2413e
parent83d26d0e1b3625ab6c2d83610a13976b52f63e0a
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.
gcc/config/aarch64/aarch64.c
gcc/config/aarch64/aarch64.md
gcc/config/aarch64/predicates.md