[llvm] [SROA] Prevent load atomic vector from being generated (PR #112432)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 09:13:11 PDT 2024
================
@@ -2853,6 +2853,11 @@ class AllocaSliceRewriter : public InstVisitor<AllocaSliceRewriter, bool> {
bool visitLoadInst(LoadInst &LI) {
LLVM_DEBUG(dbgs() << " original: " << LI << "\n");
+
+ // load atomic vector would be generated, which is illegal
+ if (LI.isAtomic() && NewAI.getAllocatedType()->isVectorTy())
----------------
arsenm wrote:
No alloca reference, just the type. The implementation should match Verifier::visitLoadInst, the isIntOrIntPtrTy || isFloatingPointTy and checkAtomicMemAccessSize (also add some non-atomic size tests?)
https://github.com/llvm/llvm-project/pull/112432
More information about the llvm-commits
mailing list