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

Harrison Hao via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 26 02:03:18 PDT 2026


================
@@ -1363,15 +1360,22 @@ LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
                    Align Align, InsertPosition InsertBef)
     : LoadInst(Ty, Ptr, Name, isVolatile, Align, AtomicOrdering::NotAtomic,
-               SyncScope::System, InsertBef) {}
+               SyncScope::System, /*IsElementwise=*/false, InsertBef) {}
 
 LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
                    Align Align, AtomicOrdering Order, SyncScope::ID SSID,
                    InsertPosition InsertBef)
+    : LoadInst(Ty, Ptr, Name, isVolatile, Align, Order, SSID,
+               /*IsElementwise=*/false, InsertBef) {}
+
+LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
----------------
harrisonGPU wrote:

I've updated it. I refactored elementwise to be the last argument.

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


More information about the llvm-commits mailing list