[llvm] [IR] Add elementwise modifier to atomic loads (PR #204556)

Yonah Goldberg via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 14:50:33 PDT 2026


================
@@ -4532,15 +4783,29 @@ void Verifier::visitLoadInst(LoadInst &LI) {
     Check(LI.getOrdering() != AtomicOrdering::Release &&
               LI.getOrdering() != AtomicOrdering::AcquireRelease,
           "Load cannot have Release ordering", &LI);
-    Check(ElTy->getScalarType()->isIntOrPtrTy() ||
-              ElTy->getScalarType()->isByteTy() ||
-              ElTy->getScalarType()->isFloatingPointTy(),
+
+    Type *ScalarTy = ElTy;
+    if (LI.isElementwise()) {
----------------
YonahGoldberg wrote:

For checking the vector type and checking that the elementwise load/store is atomic, we need a VerifierTest as well because these will get caught by the assembler in your assembler tests, so we are not actively testing this rn. See my PR for how I did this.

https://github.com/llvm/llvm-project/pull/204556


More information about the llvm-commits mailing list