[llvm] [RISCV][GlobalISel] Legalize and select G_ATOMICRMW_ADD instruction (PR #153791)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 08:25:13 PDT 2025
================
@@ -692,6 +692,13 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
.customIf(all(typeIsLegalIntOrFPVec(0, IntOrFPVecTys, ST),
typeIsLegalIntOrFPVec(1, IntOrFPVecTys, ST)));
+ bool ForceAtomics = ST.hasForcedAtomics() && !ST.hasStdExtA();
+
+ getActionDefinitionsBuilder(G_ATOMICRMW_ADD)
+ .legalFor(!ForceAtomics, {{s32, p0}, {sXLen, p0}})
----------------
topperc wrote:
Should only be legal with `ST.hasStdExtA`?
https://github.com/llvm/llvm-project/pull/153791
More information about the llvm-commits
mailing list