[llvm] [SROA] Prevent load atomic vector from being generated (PR #112432)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 20 15:30:44 PDT 2024
================
@@ -1247,9 +1247,17 @@ void LoadInst::AssertOK() {
"Ptr must have pointer type.");
}
-bool LoadInst::isValidAtomicTy(Type *Ty) {
+bool LoadInst::isValidAtomicTy(Type *Ty, const DataLayout *DL,
+ AtomicOrdering AO) {
+ // TODO: Share methods with IR/Verifier.
if (!Ty->isIntOrPtrTy() && !Ty->isFloatingPointTy())
return false;
+ if (AO == AtomicOrdering::Release || AO == AtomicOrdering::AcquireRelease)
+ return false;
+ if (DL) {
----------------
arsenm wrote:
Mandatory
https://github.com/llvm/llvm-project/pull/112432
More information about the llvm-commits
mailing list