about summary refs log tree commit diff
path: root/tests/codegen/issues
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2023-07-27 14:44:13 -0700
committerJosh Stone <jistone@redhat.com>2023-07-27 14:44:13 -0700
commitda47736f42307e450a447889ebc563cddaf93ac2 (patch)
treeb30095a49c9b920d9cdb24e0180cabab57676847 /tests/codegen/issues
parent190ded84434f435b9626a07278b9ed0e7603bd11 (diff)
downloadrust-da47736f42307e450a447889ebc563cddaf93ac2.tar.gz
rust-da47736f42307e450a447889ebc563cddaf93ac2.zip
CHECK only for opaque ptr
Diffstat (limited to 'tests/codegen/issues')
-rw-r--r--tests/codegen/issues/issue-37945.rs8
-rw-r--r--tests/codegen/issues/issue-56267-2.rs2
-rw-r--r--tests/codegen/issues/issue-56267.rs2
-rw-r--r--tests/codegen/issues/issue-56927.rs14
-rw-r--r--tests/codegen/issues/issue-58881.rs2
5 files changed, 14 insertions, 14 deletions
diff --git a/tests/codegen/issues/issue-37945.rs b/tests/codegen/issues/issue-37945.rs
index 4f386d335c7..329769940f9 100644
--- a/tests/codegen/issues/issue-37945.rs
+++ b/tests/codegen/issues/issue-37945.rs
@@ -12,11 +12,11 @@ use std::slice::Iter;
 pub fn is_empty_1(xs: Iter<f32>) -> bool {
 // CHECK-LABEL: @is_empty_1(
 // CHECK-NEXT:  start:
-// CHECK-NEXT:    [[A:%.*]] = icmp ne {{i32\*|ptr}} {{%xs.0|%xs.1}}, null
+// CHECK-NEXT:    [[A:%.*]] = icmp ne ptr {{%xs.0|%xs.1}}, null
 // CHECK-NEXT:    tail call void @llvm.assume(i1 [[A]])
 // The order between %xs.0 and %xs.1 on the next line doesn't matter
 // and different LLVM versions produce different order.
-// CHECK-NEXT:    [[B:%.*]] = icmp eq {{i32\*|ptr}} {{%xs.0, %xs.1|%xs.1, %xs.0}}
+// CHECK-NEXT:    [[B:%.*]] = icmp eq ptr {{%xs.0, %xs.1|%xs.1, %xs.0}}
 // CHECK-NEXT:    ret i1 [[B:%.*]]
     {xs}.next().is_none()
 }
@@ -25,11 +25,11 @@ pub fn is_empty_1(xs: Iter<f32>) -> bool {
 pub fn is_empty_2(xs: Iter<f32>) -> bool {
 // CHECK-LABEL: @is_empty_2
 // CHECK-NEXT:  start:
-// CHECK-NEXT:    [[C:%.*]] = icmp ne {{i32\*|ptr}} {{%xs.0|%xs.1}}, null
+// CHECK-NEXT:    [[C:%.*]] = icmp ne ptr {{%xs.0|%xs.1}}, null
 // CHECK-NEXT:    tail call void @llvm.assume(i1 [[C]])
 // The order between %xs.0 and %xs.1 on the next line doesn't matter
 // and different LLVM versions produce different order.
-// CHECK-NEXT:    [[D:%.*]] = icmp eq {{i32\*|ptr}} {{%xs.0, %xs.1|%xs.1, %xs.0}}
+// CHECK-NEXT:    [[D:%.*]] = icmp eq ptr {{%xs.0, %xs.1|%xs.1, %xs.0}}
 // CHECK-NEXT:    ret i1 [[D:%.*]]
     xs.map(|&x| x).next().is_none()
 }
diff --git a/tests/codegen/issues/issue-56267-2.rs b/tests/codegen/issues/issue-56267-2.rs
index 4dc9ebfebbc..1715e9f05ab 100644
--- a/tests/codegen/issues/issue-56267-2.rs
+++ b/tests/codegen/issues/issue-56267-2.rs
@@ -11,7 +11,7 @@ pub struct Foo<T> {
 // The load from bar.1 should have alignment 4. Not checking
 // other loads here, as the alignment will be platform-dependent.
 
-// CHECK: %{{.+}} = load i32, {{i32\*|ptr}} %{{.+}}, align 4
+// CHECK: %{{.+}} = load i32, ptr %{{.+}}, align 4
 #[no_mangle]
 pub fn test(x: Foo<(i32, i32)>) -> (i32, i32) {
     x.bar
diff --git a/tests/codegen/issues/issue-56267.rs b/tests/codegen/issues/issue-56267.rs
index 7bdd2577998..90aa9f7ae89 100644
--- a/tests/codegen/issues/issue-56267.rs
+++ b/tests/codegen/issues/issue-56267.rs
@@ -11,7 +11,7 @@ pub struct Foo<T> {
 // The store writing to bar.1 should have alignment 4. Not checking
 // other stores here, as the alignment will be platform-dependent.
 
-// CHECK: store i32 [[TMP1:%.+]], {{i32\*|ptr}} [[TMP2:%.+]], align 4
+// CHECK: store i32 [[TMP1:%.+]], ptr [[TMP2:%.+]], align 4
 #[no_mangle]
 pub fn test(x: (i32, i32)) -> Foo<(i32, i32)> {
     Foo { foo: 0, bar: x }
diff --git a/tests/codegen/issues/issue-56927.rs b/tests/codegen/issues/issue-56927.rs
index 044d721814b..1b09ce565b3 100644
--- a/tests/codegen/issues/issue-56927.rs
+++ b/tests/codegen/issues/issue-56927.rs
@@ -8,10 +8,10 @@ pub struct S {
 }
 
 // CHECK-LABEL: @test1
-// CHECK: store i32 0, {{i32\*|ptr}} %{{.+}}, align 16
-// CHECK: store i32 1, {{i32\*|ptr}} %{{.+}}, align 4
-// CHECK: store i32 2, {{i32\*|ptr}} %{{.+}}, align 8
-// CHECK: store i32 3, {{i32\*|ptr}} %{{.+}}, align 4
+// CHECK: store i32 0, ptr %{{.+}}, align 16
+// CHECK: store i32 1, ptr %{{.+}}, align 4
+// CHECK: store i32 2, ptr %{{.+}}, align 8
+// CHECK: store i32 3, ptr %{{.+}}, align 4
 #[no_mangle]
 pub fn test1(s: &mut S) {
     s.arr[0] = 0;
@@ -21,7 +21,7 @@ pub fn test1(s: &mut S) {
 }
 
 // CHECK-LABEL: @test2
-// CHECK: store i32 4, {{i32\*|ptr}} %{{.+}}, align 4
+// CHECK: store i32 4, ptr %{{.+}}, align 4
 #[allow(unconditional_panic)]
 #[no_mangle]
 pub fn test2(s: &mut S) {
@@ -29,14 +29,14 @@ pub fn test2(s: &mut S) {
 }
 
 // CHECK-LABEL: @test3
-// CHECK: store i32 5, {{i32\*|ptr}} %{{.+}}, align 4
+// CHECK: store i32 5, ptr %{{.+}}, align 4
 #[no_mangle]
 pub fn test3(s: &mut S, i: usize) {
     s.arr[i] = 5;
 }
 
 // CHECK-LABEL: @test4
-// CHECK: store i32 6, {{i32\*|ptr}} %{{.+}}, align 4
+// CHECK: store i32 6, ptr %{{.+}}, align 4
 #[no_mangle]
 pub fn test4(s: &mut S) {
     s.arr = [6; 4];
diff --git a/tests/codegen/issues/issue-58881.rs b/tests/codegen/issues/issue-58881.rs
index 00f8953d949..a1d0e8eb7e0 100644
--- a/tests/codegen/issues/issue-58881.rs
+++ b/tests/codegen/issues/issue-58881.rs
@@ -16,6 +16,6 @@ struct Bar(u64, u64, u64);
 
 // Ensure that emit arguments of the correct type.
 pub unsafe fn test_call_variadic() {
-    // CHECK: call void (i32, ...) @variadic_fn(i32 0, i8 {{.*}}, {{%Bar\*|ptr}} {{.*}})
+    // CHECK: call void (i32, ...) @variadic_fn(i32 0, i8 {{.*}}, ptr {{.*}})
     variadic_fn(0, Foo(0), Bar(0, 0, 0))
 }