@@ -7,37 +7,37 @@ use std::sync::atomic::{AtomicI32, Ordering::*};
7
7
// CHECK-LABEL: @compare_exchange
8
8
#[ no_mangle]
9
9
pub fn compare_exchange ( a : & AtomicI32 ) {
10
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 10 monotonic monotonic
11
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 11 monotonic acquire
12
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 12 monotonic seq_cst
10
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 10 monotonic monotonic
11
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 11 monotonic acquire
12
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 12 monotonic seq_cst
13
13
let _ = a. compare_exchange ( 0 , 10 , Relaxed , Relaxed ) ;
14
14
let _ = a. compare_exchange ( 0 , 11 , Relaxed , Acquire ) ;
15
15
let _ = a. compare_exchange ( 0 , 12 , Relaxed , SeqCst ) ;
16
16
17
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 20 release monotonic
18
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 21 release acquire
19
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 22 release seq_cst
17
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 20 release monotonic
18
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 21 release acquire
19
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 22 release seq_cst
20
20
let _ = a. compare_exchange ( 0 , 20 , Release , Relaxed ) ;
21
21
let _ = a. compare_exchange ( 0 , 21 , Release , Acquire ) ;
22
22
let _ = a. compare_exchange ( 0 , 22 , Release , SeqCst ) ;
23
23
24
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 30 acquire monotonic
25
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 31 acquire acquire
26
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 32 acquire seq_cst
24
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 30 acquire monotonic
25
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 31 acquire acquire
26
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 32 acquire seq_cst
27
27
let _ = a. compare_exchange ( 0 , 30 , Acquire , Relaxed ) ;
28
28
let _ = a. compare_exchange ( 0 , 31 , Acquire , Acquire ) ;
29
29
let _ = a. compare_exchange ( 0 , 32 , Acquire , SeqCst ) ;
30
30
31
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 40 acq_rel monotonic
32
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 41 acq_rel acquire
33
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 42 acq_rel seq_cst
31
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 40 acq_rel monotonic
32
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 41 acq_rel acquire
33
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 42 acq_rel seq_cst
34
34
let _ = a. compare_exchange ( 0 , 40 , AcqRel , Relaxed ) ;
35
35
let _ = a. compare_exchange ( 0 , 41 , AcqRel , Acquire ) ;
36
36
let _ = a. compare_exchange ( 0 , 42 , AcqRel , SeqCst ) ;
37
37
38
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 50 seq_cst monotonic
39
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 51 seq_cst acquire
40
- // CHECK: cmpxchg {{i32\*| ptr}} %{{.*}}, i32 0, i32 52 seq_cst seq_cst
38
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 50 seq_cst monotonic
39
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 51 seq_cst acquire
40
+ // CHECK: cmpxchg ptr %{{.*}}, i32 0, i32 52 seq_cst seq_cst
41
41
let _ = a. compare_exchange ( 0 , 50 , SeqCst , Relaxed ) ;
42
42
let _ = a. compare_exchange ( 0 , 51 , SeqCst , Acquire ) ;
43
43
let _ = a. compare_exchange ( 0 , 52 , SeqCst , SeqCst ) ;
@@ -46,37 +46,37 @@ pub fn compare_exchange(a: &AtomicI32) {
46
46
// CHECK-LABEL: @compare_exchange_weak
47
47
#[ no_mangle]
48
48
pub fn compare_exchange_weak ( w : & AtomicI32 ) {
49
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 10 monotonic monotonic
50
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 11 monotonic acquire
51
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 12 monotonic seq_cst
49
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 10 monotonic monotonic
50
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 11 monotonic acquire
51
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 12 monotonic seq_cst
52
52
let _ = w. compare_exchange_weak ( 1 , 10 , Relaxed , Relaxed ) ;
53
53
let _ = w. compare_exchange_weak ( 1 , 11 , Relaxed , Acquire ) ;
54
54
let _ = w. compare_exchange_weak ( 1 , 12 , Relaxed , SeqCst ) ;
55
55
56
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 20 release monotonic
57
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 21 release acquire
58
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 22 release seq_cst
56
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 20 release monotonic
57
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 21 release acquire
58
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 22 release seq_cst
59
59
let _ = w. compare_exchange_weak ( 1 , 20 , Release , Relaxed ) ;
60
60
let _ = w. compare_exchange_weak ( 1 , 21 , Release , Acquire ) ;
61
61
let _ = w. compare_exchange_weak ( 1 , 22 , Release , SeqCst ) ;
62
62
63
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 30 acquire monotonic
64
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 31 acquire acquire
65
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 32 acquire seq_cst
63
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 30 acquire monotonic
64
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 31 acquire acquire
65
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 32 acquire seq_cst
66
66
let _ = w. compare_exchange_weak ( 1 , 30 , Acquire , Relaxed ) ;
67
67
let _ = w. compare_exchange_weak ( 1 , 31 , Acquire , Acquire ) ;
68
68
let _ = w. compare_exchange_weak ( 1 , 32 , Acquire , SeqCst ) ;
69
69
70
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 40 acq_rel monotonic
71
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 41 acq_rel acquire
72
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 42 acq_rel seq_cst
70
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 40 acq_rel monotonic
71
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 41 acq_rel acquire
72
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 42 acq_rel seq_cst
73
73
let _ = w. compare_exchange_weak ( 1 , 40 , AcqRel , Relaxed ) ;
74
74
let _ = w. compare_exchange_weak ( 1 , 41 , AcqRel , Acquire ) ;
75
75
let _ = w. compare_exchange_weak ( 1 , 42 , AcqRel , SeqCst ) ;
76
76
77
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 50 seq_cst monotonic
78
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 51 seq_cst acquire
79
- // CHECK: cmpxchg weak {{i32\*| ptr}} %{{.*}}, i32 1, i32 52 seq_cst seq_cst
77
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 50 seq_cst monotonic
78
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 51 seq_cst acquire
79
+ // CHECK: cmpxchg weak ptr %{{.*}}, i32 1, i32 52 seq_cst seq_cst
80
80
let _ = w. compare_exchange_weak ( 1 , 50 , SeqCst , Relaxed ) ;
81
81
let _ = w. compare_exchange_weak ( 1 , 51 , SeqCst , Acquire ) ;
82
82
let _ = w. compare_exchange_weak ( 1 , 52 , SeqCst , SeqCst ) ;
0 commit comments