diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-10-24 10:58:40 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-10-24 10:58:40 +0100 |
commit | b632a516a0448818a25f35e15a4bf0a3187af359 (patch) | |
tree | 784866ddd00a06d8c8801be25cafb9beab52f0dd /gcc/config/aarch64/atomics.md | |
parent | b44d4ff7b43ff6a34d5c074c7ade03c4a38974fa (diff) | |
download | gcc-b632a516a0448818a25f35e15a4bf0a3187af359.zip gcc-b632a516a0448818a25f35e15a4bf0a3187af359.tar.gz gcc-b632a516a0448818a25f35e15a4bf0a3187af359.tar.bz2 |
aarch64: Avoid bogus atomics match
The non-LSE pattern aarch64_atomic_exchange<mode> comes before the
LSE pattern aarch64_atomic_exchange<mode>_lse. From a recog
perspective, the only difference between the patterns is that
the non-LSE one clobbers CC and needs a scratch.
However, combine and RTL-SSA can both add clobbers to make a
pattern match. This means that if they try to rerecognise an
LSE pattern, they could end up turning it into a non-LSE pattern.
This patch adds a !TARGET_LSE test to avoid that.
This is needed to avoid a regression with later patches.
gcc/
* config/aarch64/atomics.md (aarch64_atomic_exchange<mode>): Require
!TARGET_LSE.
Diffstat (limited to 'gcc/config/aarch64/atomics.md')
-rw-r--r-- | gcc/config/aarch64/atomics.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/aarch64/atomics.md b/gcc/config/aarch64/atomics.md index 2b6f04e..055a873 100644 --- a/gcc/config/aarch64/atomics.md +++ b/gcc/config/aarch64/atomics.md @@ -224,7 +224,7 @@ UNSPECV_ATOMIC_EXCHG)) (clobber (reg:CC CC_REGNUM)) (clobber (match_scratch:SI 4 "=&r"))] - "" + "!TARGET_LSE" "#" "&& epilogue_completed" [(const_int 0)] |