1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2
2
; RUN: llc < %s -mtriple=x86_64-apple-macosx10.7.0 -verify-machineinstrs | FileCheck %s
3
3
; 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
4
5
5
6
define void @test1 (ptr %ptr , i32 %val1 ) {
6
7
; CHECK-LABEL: test1:
7
8
; CHECK: ## %bb.0:
8
9
; CHECK-NEXT: xchgl %esi, (%rdi)
9
10
; CHECK-NEXT: retq
11
+ ;
12
+ ; CHECK0-LABEL: test1:
13
+ ; CHECK0: # %bb.0:
14
+ ; CHECK0-NEXT: xchgl %esi, (%rdi)
15
+ ; CHECK0-NEXT: retq
10
16
store atomic i32 %val1 , ptr %ptr seq_cst , align 4
11
17
ret void
12
18
}
@@ -16,6 +22,11 @@ define void @test2(ptr %ptr, i32 %val1) {
16
22
; CHECK: ## %bb.0:
17
23
; CHECK-NEXT: movl %esi, (%rdi)
18
24
; CHECK-NEXT: retq
25
+ ;
26
+ ; CHECK0-LABEL: test2:
27
+ ; CHECK0: # %bb.0:
28
+ ; CHECK0-NEXT: movl %esi, (%rdi)
29
+ ; CHECK0-NEXT: retq
19
30
store atomic i32 %val1 , ptr %ptr release , align 4
20
31
ret void
21
32
}
@@ -25,6 +36,35 @@ define i32 @test3(ptr %ptr) {
25
36
; CHECK: ## %bb.0:
26
37
; CHECK-NEXT: movl (%rdi), %eax
27
38
; CHECK-NEXT: retq
39
+ ;
40
+ ; CHECK0-LABEL: test3:
41
+ ; CHECK0: # %bb.0:
42
+ ; CHECK0-NEXT: movl (%rdi), %eax
43
+ ; CHECK0-NEXT: retq
28
44
%val = load atomic i32 , ptr %ptr seq_cst , align 4
29
45
ret i32 %val
30
46
}
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