[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:03 PDT 2026


================
@@ -0,0 +1,16 @@
+; RUN: llvm-as %s -o - | llvm-dis | FileCheck %s
+; RUN: llvm-as %s -o - | verify-uselistorder
+
+define <2 x float> @load_elem_f32(ptr %p) {
+; CHECK-LABEL: @load_elem_f32(
+; CHECK: %v = load atomic elementwise <2 x float>, ptr %p syncscope("agent") monotonic, align 4
+  %v = load atomic elementwise <2 x float>, ptr %p syncscope("agent") monotonic, align 4
+  ret <2 x float> %v
+}
+
+define <4 x i32> @load_elem_i32_volatile(ptr %p) {
----------------
harrisonGPU wrote:

I'll add store in the next PR.

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


More information about the llvm-commits mailing list