[llvm] [AArch64] Put legal action first for G_ATOMIC_CMPXCHG (PR #74613)
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 15 07:15:03 PST 2023
================
@@ -758,11 +758,11 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
all(typeInSet(0, {s8, s16, s32, s64, s128}), typeIs(2, p0)));
getActionDefinitionsBuilder(G_ATOMIC_CMPXCHG)
+ .clampScalar(0, s32, s128)
+ .legalIf(all(typeInSet(0, {s32, s64}), typeIs(1, p0)))
.customIf([](const LegalityQuery &Query) {
----------------
RoboTux wrote:
As pointed by Pavel, typeIs(0, s128) is not the same as testing that the size in bits is 128 due to vector. Although the intent is probably to former, keeping the existing check makes this more of an NFC.
https://github.com/llvm/llvm-project/pull/74613
More information about the llvm-commits
mailing list