-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AArch64] Put legal action first for G_ATOMIC_CMPXCHG #74613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fd4ec06
c8cc831
b8e1aba
bcced0c
77f3605
620ce1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -758,18 +758,18 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST) | |
all(typeInSet(0, {s8, s16, s32, s64, s128}), typeIs(2, p0))); | ||
|
||
getActionDefinitionsBuilder(G_ATOMIC_CMPXCHG) | ||
.legalIf(all(typeInSet(0, {s32, s64}), typeIs(1, p0))) | ||
.customIf([](const LegalityQuery &Query) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That should become a simple custom() There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
return Query.Types[0].getSizeInBits() == 128; | ||
}) | ||
.clampScalar(0, s32, s64) | ||
.legalIf(all(typeInSet(0, {s32, s64}), typeIs(1, p0))); | ||
.clampScalar(0, s32, s64); | ||
|
||
getActionDefinitionsBuilder( | ||
{G_ATOMICRMW_XCHG, G_ATOMICRMW_ADD, G_ATOMICRMW_SUB, G_ATOMICRMW_AND, | ||
G_ATOMICRMW_OR, G_ATOMICRMW_XOR, G_ATOMICRMW_MIN, G_ATOMICRMW_MAX, | ||
G_ATOMICRMW_UMIN, G_ATOMICRMW_UMAX}) | ||
.clampScalar(0, s32, s64) | ||
.legalIf(all(typeInSet(0, {s32, s64}), typeIs(1, p0))); | ||
.legalIf(all(typeInSet(0, {s32, s64}), typeIs(1, p0))) | ||
.clampScalar(0, s32, s64); | ||
|
||
getActionDefinitionsBuilder(G_BLOCK_ADDR).legalFor({p0}); | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.