Skip to content

Commit 009b140

Browse files
committed
Add to preexisting test
1 parent 78ec95b commit 009b140

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

llvm/test/CodeGen/X86/atomic-load-store.ll

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc < %s -mtriple=x86_64-apple-macosx10.7.0 -verify-machineinstrs | FileCheck %s
33
; RUN: llc < %s -mtriple=x86_64-apple-macosx10.7.0 -verify-machineinstrs -O0 | FileCheck %s
4+
; RUN: llc %s --mtriple=x86_64 -o - | FileCheck %s --check-prefix=CHECK0
45

56
define void @test1(ptr %ptr, i32 %val1) {
67
; CHECK-LABEL: test1:
78
; CHECK: ## %bb.0:
89
; CHECK-NEXT: xchgl %esi, (%rdi)
910
; CHECK-NEXT: retq
11+
;
12+
; CHECK0-LABEL: test1:
13+
; CHECK0: # %bb.0:
14+
; CHECK0-NEXT: xchgl %esi, (%rdi)
15+
; CHECK0-NEXT: retq
1016
store atomic i32 %val1, ptr %ptr seq_cst, align 4
1117
ret void
1218
}
@@ -16,6 +22,11 @@ define void @test2(ptr %ptr, i32 %val1) {
1622
; CHECK: ## %bb.0:
1723
; CHECK-NEXT: movl %esi, (%rdi)
1824
; CHECK-NEXT: retq
25+
;
26+
; CHECK0-LABEL: test2:
27+
; CHECK0: # %bb.0:
28+
; CHECK0-NEXT: movl %esi, (%rdi)
29+
; CHECK0-NEXT: retq
1930
store atomic i32 %val1, ptr %ptr release, align 4
2031
ret void
2132
}
@@ -25,6 +36,35 @@ define i32 @test3(ptr %ptr) {
2536
; CHECK: ## %bb.0:
2637
; CHECK-NEXT: movl (%rdi), %eax
2738
; CHECK-NEXT: retq
39+
;
40+
; CHECK0-LABEL: test3:
41+
; CHECK0: # %bb.0:
42+
; CHECK0-NEXT: movl (%rdi), %eax
43+
; CHECK0-NEXT: retq
2844
%val = load atomic i32, ptr %ptr seq_cst, align 4
2945
ret i32 %val
3046
}
47+
48+
define <1 x i32> @atomic_scalar_i32(ptr %x) {
49+
; CHECK-LABEL: atomic_scalar_i32:
50+
; CHECK: ## %bb.0:
51+
; CHECK-NEXT: movl (%rdi), %eax
52+
; CHECK-NEXT: retq
53+
;
54+
; CHECK0-LABEL: atomic_scalar_i32:
55+
; CHECK0: # %bb.0:
56+
; CHECK0-NEXT: movl (%rdi), %eax
57+
; CHECK0-NEXT: retq
58+
%ret = load atomic <1 x i32>, ptr %x acquire, align 4
59+
ret <1 x i32> %ret
60+
}
61+
62+
define <1 x bfloat> @atomic_scalar_bfloat(ptr %x) {
63+
; CHECK0-LABEL: atomic_scalar_bfloat:
64+
; CHECK0: # %bb.0:
65+
; CHECK0-NEXT: movzwl (%rdi), %eax
66+
; CHECK0-NEXT: pinsrw $0, %eax, %xmm0
67+
; CHECK0-NEXT: retq
68+
%ret = load atomic <1 x bfloat>, ptr %x acquire, align 4
69+
ret <1 x bfloat> %ret
70+
}

0 commit comments

Comments
 (0)