[llvm-branch-commits] [llvm] [X86] Add atomic vector tests for >1 sizes. (PR #120387)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 18 17:31:25 PST 2024


================
@@ -127,6 +127,34 @@ define <1 x bfloat> @atomic_vec1_bfloat(ptr %x) {
   ret <1 x bfloat> %ret
 }
 
+define <1 x ptr> @atomic_vec1_ptr(ptr %x) nounwind {
+; CHECK3-LABEL: atomic_vec1_ptr:
+; CHECK3:       ## %bb.0:
+; CHECK3-NEXT:    pushq %rax
+; CHECK3-NEXT:    movq %rdi, %rsi
+; CHECK3-NEXT:    movq %rsp, %rdx
+; CHECK3-NEXT:    movl $8, %edi
+; CHECK3-NEXT:    movl $2, %ecx
+; CHECK3-NEXT:    callq ___atomic_load
+; CHECK3-NEXT:    movq (%rsp), %rax
+; CHECK3-NEXT:    popq %rcx
+; CHECK3-NEXT:    retq
+;
+; CHECK0-LABEL: atomic_vec1_ptr:
+; CHECK0:       ## %bb.0:
+; CHECK0-NEXT:    pushq %rax
+; CHECK0-NEXT:    movq %rdi, %rsi
+; CHECK0-NEXT:    movl $8, %edi
+; CHECK0-NEXT:    movq %rsp, %rdx
+; CHECK0-NEXT:    movl $2, %ecx
+; CHECK0-NEXT:    callq ___atomic_load
+; CHECK0-NEXT:    movq (%rsp), %rax
+; CHECK0-NEXT:    popq %rcx
+; CHECK0-NEXT:    retq
+  %ret = load atomic <1 x ptr>, ptr %x acquire, align 4
----------------
arsenm wrote:

Should test the naturally aligned case, this under-aligned one is a separate test 

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


More information about the llvm-branch-commits mailing list