diff options
| author | Nikita Popov <npopov@redhat.com> | 2022-02-21 11:21:23 +0100 | 
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2022-05-25 17:29:37 +0200 | 
| commit | 4d7ff4e5096625b56f154fa485a1af9351c41b5c (patch) | |
| tree | 3accd67d92f1ed24fa40659753d104e198a0df35 /src/test/codegen/atomic-operations.rs | |
| parent | ebc8ab1e4e678202977e17a34313a98e7e899ed3 (diff) | |
| download | rust-4d7ff4e5096625b56f154fa485a1af9351c41b5c.tar.gz rust-4d7ff4e5096625b56f154fa485a1af9351c41b5c.zip | |
Update some codegen tests for opaque pointers
Diffstat (limited to 'src/test/codegen/atomic-operations.rs')
| -rw-r--r-- | src/test/codegen/atomic-operations.rs | 36 | 
1 files changed, 18 insertions, 18 deletions
| diff --git a/src/test/codegen/atomic-operations.rs b/src/test/codegen/atomic-operations.rs index ff94ac8543f..a14f63726bb 100644 --- a/src/test/codegen/atomic-operations.rs +++ b/src/test/codegen/atomic-operations.rs @@ -8,25 +8,25 @@ use std::sync::atomic::{AtomicI32, Ordering::*}; // CHECK-LABEL: @compare_exchange #[no_mangle] pub fn compare_exchange(a: &AtomicI32) { - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 10 monotonic monotonic + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 10 monotonic monotonic let _ = a.compare_exchange(0, 10, Relaxed, Relaxed); - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 20 release monotonic + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 20 release monotonic let _ = a.compare_exchange(0, 20, Release, Relaxed); - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 30 acquire monotonic - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 31 acquire acquire + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 30 acquire monotonic + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 31 acquire acquire let _ = a.compare_exchange(0, 30, Acquire, Relaxed); let _ = a.compare_exchange(0, 31, Acquire, Acquire); - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 40 acq_rel monotonic - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 41 acq_rel acquire + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 40 acq_rel monotonic + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 41 acq_rel acquire let _ = a.compare_exchange(0, 40, AcqRel, Relaxed); let _ = a.compare_exchange(0, 41, AcqRel, Acquire); - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 50 seq_cst monotonic - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 51 seq_cst acquire - // CHECK: cmpxchg i32* %{{.*}}, i32 0, i32 52 seq_cst seq_cst + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 50 seq_cst monotonic + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 51 seq_cst acquire + // CHECK: cmpxchg {{i32\*|ptr}} %{{.*}}, i32 0, i32 52 seq_cst seq_cst let _ = a.compare_exchange(0, 50, SeqCst, Relaxed); let _ = a.compare_exchange(0, 51, SeqCst, Acquire); let _ = a.compare_exchange(0, 52, SeqCst, SeqCst); @@ -35,25 +35,25 @@ pub fn compare_exchange(a: &AtomicI32) { // CHECK-LABEL: @compare_exchange_weak #[no_mangle] pub fn compare_exchange_weak(w: &AtomicI32) { - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 10 monotonic monotonic + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 10 monotonic monotonic let _ = w.compare_exchange_weak(1, 10, Relaxed, Relaxed); - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 20 release monotonic + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 20 release monotonic let _ = w.compare_exchange_weak(1, 20, Release, Relaxed); - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 30 acquire monotonic - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 31 acquire acquire + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 30 acquire monotonic + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 31 acquire acquire let _ = w.compare_exchange_weak(1, 30, Acquire, Relaxed); let _ = w.compare_exchange_weak(1, 31, Acquire, Acquire); - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 40 acq_rel monotonic - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 41 acq_rel acquire + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 40 acq_rel monotonic + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 41 acq_rel acquire let _ = w.compare_exchange_weak(1, 40, AcqRel, Relaxed); let _ = w.compare_exchange_weak(1, 41, AcqRel, Acquire); - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 50 seq_cst monotonic - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 51 seq_cst acquire - // CHECK: cmpxchg weak i32* %{{.*}}, i32 1, i32 52 seq_cst seq_cst + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 50 seq_cst monotonic + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 51 seq_cst acquire + // CHECK: cmpxchg weak {{i32\*|ptr}} %{{.*}}, i32 1, i32 52 seq_cst seq_cst let _ = w.compare_exchange_weak(1, 50, SeqCst, Relaxed); let _ = w.compare_exchange_weak(1, 51, SeqCst, Acquire); let _ = w.compare_exchange_weak(1, 52, SeqCst, SeqCst); | 
