@@ -7,37 +7,37 @@ use std::sync::atomic::{AtomicI32, Ordering::*};
77// CHECK-LABEL: @compare_exchange
88#[ no_mangle]
99pub 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
1313 let _ = a. compare_exchange ( 0 , 10 , Relaxed , Relaxed ) ;
1414 let _ = a. compare_exchange ( 0 , 11 , Relaxed , Acquire ) ;
1515 let _ = a. compare_exchange ( 0 , 12 , Relaxed , SeqCst ) ;
1616
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
2020 let _ = a. compare_exchange ( 0 , 20 , Release , Relaxed ) ;
2121 let _ = a. compare_exchange ( 0 , 21 , Release , Acquire ) ;
2222 let _ = a. compare_exchange ( 0 , 22 , Release , SeqCst ) ;
2323
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
2727 let _ = a. compare_exchange ( 0 , 30 , Acquire , Relaxed ) ;
2828 let _ = a. compare_exchange ( 0 , 31 , Acquire , Acquire ) ;
2929 let _ = a. compare_exchange ( 0 , 32 , Acquire , SeqCst ) ;
3030
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
3434 let _ = a. compare_exchange ( 0 , 40 , AcqRel , Relaxed ) ;
3535 let _ = a. compare_exchange ( 0 , 41 , AcqRel , Acquire ) ;
3636 let _ = a. compare_exchange ( 0 , 42 , AcqRel , SeqCst ) ;
3737
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
4141 let _ = a. compare_exchange ( 0 , 50 , SeqCst , Relaxed ) ;
4242 let _ = a. compare_exchange ( 0 , 51 , SeqCst , Acquire ) ;
4343 let _ = a. compare_exchange ( 0 , 52 , SeqCst , SeqCst ) ;
@@ -46,37 +46,37 @@ pub fn compare_exchange(a: &AtomicI32) {
4646// CHECK-LABEL: @compare_exchange_weak
4747#[ no_mangle]
4848pub 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
5252 let _ = w. compare_exchange_weak ( 1 , 10 , Relaxed , Relaxed ) ;
5353 let _ = w. compare_exchange_weak ( 1 , 11 , Relaxed , Acquire ) ;
5454 let _ = w. compare_exchange_weak ( 1 , 12 , Relaxed , SeqCst ) ;
5555
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
5959 let _ = w. compare_exchange_weak ( 1 , 20 , Release , Relaxed ) ;
6060 let _ = w. compare_exchange_weak ( 1 , 21 , Release , Acquire ) ;
6161 let _ = w. compare_exchange_weak ( 1 , 22 , Release , SeqCst ) ;
6262
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
6666 let _ = w. compare_exchange_weak ( 1 , 30 , Acquire , Relaxed ) ;
6767 let _ = w. compare_exchange_weak ( 1 , 31 , Acquire , Acquire ) ;
6868 let _ = w. compare_exchange_weak ( 1 , 32 , Acquire , SeqCst ) ;
6969
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
7373 let _ = w. compare_exchange_weak ( 1 , 40 , AcqRel , Relaxed ) ;
7474 let _ = w. compare_exchange_weak ( 1 , 41 , AcqRel , Acquire ) ;
7575 let _ = w. compare_exchange_weak ( 1 , 42 , AcqRel , SeqCst ) ;
7676
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
8080 let _ = w. compare_exchange_weak ( 1 , 50 , SeqCst , Relaxed ) ;
8181 let _ = w. compare_exchange_weak ( 1 , 51 , SeqCst , Acquire ) ;
8282 let _ = w. compare_exchange_weak ( 1 , 52 , SeqCst , SeqCst ) ;
0 commit comments