about summary refs log tree commit diff
path: root/src/test/codegen/stores.rs
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-02-21 11:21:23 +0100
committerNikita Popov <npopov@redhat.com>2022-05-25 17:29:37 +0200
commit4d7ff4e5096625b56f154fa485a1af9351c41b5c (patch)
tree3accd67d92f1ed24fa40659753d104e198a0df35 /src/test/codegen/stores.rs
parentebc8ab1e4e678202977e17a34313a98e7e899ed3 (diff)
downloadrust-4d7ff4e5096625b56f154fa485a1af9351c41b5c.tar.gz
rust-4d7ff4e5096625b56f154fa485a1af9351c41b5c.zip
Update some codegen tests for opaque pointers
Diffstat (limited to 'src/test/codegen/stores.rs')
-rw-r--r--src/test/codegen/stores.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/test/codegen/stores.rs b/src/test/codegen/stores.rs
index 17f051a5bce..837256e5369 100644
--- a/src/test/codegen/stores.rs
+++ b/src/test/codegen/stores.rs
@@ -17,10 +17,8 @@ pub struct Bytes {
 pub fn small_array_alignment(x: &mut [i8; 4], y: [i8; 4]) {
 // CHECK: [[TMP:%.+]] = alloca i32
 // CHECK: %y = alloca [4 x i8]
-// CHECK: store i32 %0, i32* [[TMP]]
-// CHECK: [[Y8:%[0-9]+]] = bitcast [4 x i8]* %y to i8*
-// CHECK: [[TMP8:%[0-9]+]] = bitcast i32* [[TMP]] to i8*
-// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 1 [[Y8]], i8* align 4 [[TMP8]], i{{[0-9]+}} 4, i1 false)
+// CHECK: store i32 %0, {{i32\*|ptr}} [[TMP]]
+// CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 1 {{.+}}, {{i8\*|ptr}} align 4 {{.+}}, i{{[0-9]+}} 4, i1 false)
     *x = y;
 }
 
@@ -31,9 +29,7 @@ pub fn small_array_alignment(x: &mut [i8; 4], y: [i8; 4]) {
 pub fn small_struct_alignment(x: &mut Bytes, y: Bytes) {
 // CHECK: [[TMP:%.+]] = alloca i32
 // CHECK: %y = alloca %Bytes
-// CHECK: store i32 %0, i32* [[TMP]]
-// CHECK: [[Y8:%[0-9]+]] = bitcast %Bytes* %y to i8*
-// CHECK: [[TMP8:%[0-9]+]] = bitcast i32* [[TMP]] to i8*
-// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 1 [[Y8]], i8* align 4 [[TMP8]], i{{[0-9]+}} 4, i1 false)
+// CHECK: store i32 %0, {{i32\*|ptr}} [[TMP]]
+// CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 1 {{.+}}, {{i8\*|ptr}} align 4 {{.+}}, i{{[0-9]+}} 4, i1 false)
     *x = y;
 }