diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-03-14 14:09:20 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-03-14 14:09:20 +0100 |
commit | 9349aefa1df7ae36714b7b9f426ad46e314892d1 (patch) | |
tree | 574b2dbd298fdae181c0ebdefea569252da7be6b /gcc/fortran/dump-parse-tree.cc | |
parent | 075104eef6d0ff215c394b6eaadcb525fa7c4975 (diff) | |
download | gcc-9349aefa1df7ae36714b7b9f426ad46e314892d1.zip gcc-9349aefa1df7ae36714b7b9f426ad46e314892d1.tar.gz gcc-9349aefa1df7ae36714b7b9f426ad46e314892d1.tar.bz2 |
aarch64: Fix TImode __sync_*_compare_and_exchange expansion with LSE [PR114310]
The following testcase ICEs with LSE atomics.
The problem is that the @atomic_compare_and_swap<mode> expander uses
aarch64_reg_or_zero predicate for the desired operand, which is fine,
given that for most of the modes and even for TImode in some cases
it can handle zero immediate just fine, but the TImode
@aarch64_compare_and_swap<mode>_lse just uses register_operand for
that operand instead, again intentionally so, because the casp,
caspa, caspl and caspal instructions need to use a pair of consecutive
registers for the operand and xzr is just one register and we can't
just store zero into the link register to emulate pair of zeros.
So, the following patch fixes that by forcing the newval operand into
a register for the TImode LSE case.
2024-03-14 Jakub Jelinek <jakub@redhat.com>
PR target/114310
* config/aarch64/aarch64.cc (aarch64_expand_compare_and_swap): For
TImode force newval into a register.
* gcc.dg/pr114310.c: New test.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.cc')
0 files changed, 0 insertions, 0 deletions