[llvm] [Verifier] Reject elementwise atomicrmw with sub-byte element type (PR #213753)

Yonah Goldberg via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 00:53:58 PDT 2026


================
@@ -4622,28 +4617,26 @@ void Verifier::visitLoadInst(LoadInst &LI) {
               LI.getOrdering() != AtomicOrdering::AcquireRelease,
           "Load cannot have Release ordering", &LI);
 
-    Type *ScalarTy = ElTy;
     if (LI.isElementwise()) {
       Check(LI.getOrdering() != AtomicOrdering::SequentiallyConsistent,
             "atomic elementwise load cannot be sequentially consistent.", &LI);
       auto *VecTy = dyn_cast<FixedVectorType>(ElTy);
       Check(VecTy,
             "atomic elementwise load operand must have fixed vector type!", &LI,
             ElTy);
-      if (VecTy) {
-        checkAtomicMemAccessSize(ScalarTy, &LI);
-        ScalarTy = VecTy->getElementType();
-      }
+
----------------
YonahGoldberg wrote:

Sounds good, extracted this part here: https://github.com/llvm/llvm-project/pull/213864

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


More information about the llvm-commits mailing list