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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 01:14:31 PDT 2026


================
@@ -31,3 +32,10 @@ define <5 x i32> @bad_odd_sized_vector(ptr %p) {
   %v = load atomic elementwise <5 x i32>, ptr %p monotonic, align 4
   ret <5 x i32> %v
 }
+
+;--- load-non-byte.ll
+; CHECK: atomic memory access' size must be byte-sized
+define <4 x i1> @bad_non_byte(ptr %p) {
+  %v = load atomic elementwise <4 x i1>, ptr %p monotonic, align 4
+  ret <4 x i1> %v
+}
----------------
arsenm wrote:

Also check 8 x i1 for good measure, the message here doesn't make it clear the element needs to be byte sized 

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


More information about the llvm-commits mailing list