about summary refs log tree commit diff
path: root/tests/codegen/packed.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-29 14:57:47 +0000
committerbors <bors@rust-lang.org>2023-07-29 14:57:47 +0000
commit4c968227965f101e41bda8a38ff02fd1baee28c4 (patch)
tree9194769552f852f142014e2e17957ab66bbc229a /tests/codegen/packed.rs
parentf9f674f2bcf9cb67ef29123dd3a631485cba22c8 (diff)
parentda47736f42307e450a447889ebc563cddaf93ac2 (diff)
downloadrust-4c968227965f101e41bda8a38ff02fd1baee28c4.tar.gz
rust-4c968227965f101e41bda8a38ff02fd1baee28c4.zip
Auto merge of #114148 - cuviper:drop-llvm-14, r=nikic
Update the minimum external LLVM to 15

With this change, we'll have stable support for LLVM 15 through 17 (pending release).
For reference, the previous increase to LLVM 14 was #107573.
Diffstat (limited to 'tests/codegen/packed.rs')
-rw-r--r--tests/codegen/packed.rs40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/codegen/packed.rs b/tests/codegen/packed.rs
index fd63b4f0acd..96cd9a42e7d 100644
--- a/tests/codegen/packed.rs
+++ b/tests/codegen/packed.rs
@@ -18,8 +18,8 @@ pub struct Packed2 {
 // CHECK-LABEL: @write_pkd1
 #[no_mangle]
 pub fn write_pkd1(pkd: &mut Packed1) -> u32 {
-// CHECK: %{{.*}} = load i32, {{i32\*|ptr}} %{{.*}}, align 1
-// CHECK: store i32 42, {{i32\*|ptr}} %{{.*}}, align 1
+// CHECK: %{{.*}} = load i32, ptr %{{.*}}, align 1
+// CHECK: store i32 42, ptr %{{.*}}, align 1
     let result = pkd.data;
     pkd.data = 42;
     result
@@ -28,8 +28,8 @@ pub fn write_pkd1(pkd: &mut Packed1) -> u32 {
 // CHECK-LABEL: @write_pkd2
 #[no_mangle]
 pub fn write_pkd2(pkd: &mut Packed2) -> u32 {
-// CHECK: %{{.*}} = load i32, {{i32\*|ptr}} %{{.*}}, align 2
-// CHECK: store i32 42, {{i32\*|ptr}} %{{.*}}, align 2
+// CHECK: %{{.*}} = load i32, ptr %{{.*}}, align 2
+// CHECK: store i32 42, ptr %{{.*}}, align 2
     let result = pkd.data;
     pkd.data = 42;
     result
@@ -52,8 +52,8 @@ pub struct BigPacked2 {
 #[no_mangle]
 pub fn call_pkd1(f: fn() -> Array) -> BigPacked1 {
 // CHECK: [[ALLOCA:%[_a-z0-9]+]] = alloca %Array
-// CHECK: call void %{{.*}}({{%Array\*|ptr}} noalias nocapture noundef sret{{.*}} dereferenceable(32) [[ALLOCA]])
-// CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 1 %{{.*}}, {{i8\*|ptr}} align 4 %{{.*}}, i{{[0-9]+}} 32, i1 false)
+// CHECK: call void %{{.*}}(ptr noalias nocapture noundef sret{{.*}} dereferenceable(32) [[ALLOCA]])
+// CHECK: call void @llvm.memcpy.{{.*}}(ptr align 1 %{{.*}}, ptr align 4 %{{.*}}, i{{[0-9]+}} 32, i1 false)
     // check that calls whose destination is a field of a packed struct
     // go through an alloca rather than calling the function with an
     // unaligned destination.
@@ -64,8 +64,8 @@ pub fn call_pkd1(f: fn() -> Array) -> BigPacked1 {
 #[no_mangle]
 pub fn call_pkd2(f: fn() -> Array) -> BigPacked2 {
 // CHECK: [[ALLOCA:%[_a-z0-9]+]] = alloca %Array
-// CHECK: call void %{{.*}}({{%Array\*|ptr}} noalias nocapture noundef sret{{.*}} dereferenceable(32) [[ALLOCA]])
-// CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 2 %{{.*}}, {{i8\*|ptr}} align 4 %{{.*}}, i{{[0-9]+}} 32, i1 false)
+// CHECK: call void %{{.*}}(ptr noalias nocapture noundef sret{{.*}} dereferenceable(32) [[ALLOCA]])
+// CHECK: call void @llvm.memcpy.{{.*}}(ptr align 2 %{{.*}}, ptr align 4 %{{.*}}, i{{[0-9]+}} 32, i1 false)
     // check that calls whose destination is a field of a packed struct
     // go through an alloca rather than calling the function with an
     // unaligned destination.
@@ -73,9 +73,9 @@ pub fn call_pkd2(f: fn() -> Array) -> BigPacked2 {
 }
 
 // CHECK-LABEL: @write_packed_array1
-// CHECK: store i32 0, {{i32\*|ptr}} %{{.+}}, align 1
-// CHECK: store i32 1, {{i32\*|ptr}} %{{.+}}, align 1
-// CHECK: store i32 2, {{i32\*|ptr}} %{{.+}}, align 1
+// CHECK: store i32 0, ptr %{{.+}}, align 1
+// CHECK: store i32 1, ptr %{{.+}}, align 1
+// CHECK: store i32 2, ptr %{{.+}}, align 1
 #[no_mangle]
 pub fn write_packed_array1(p: &mut BigPacked1) {
     p.data.0[0] = 0;
@@ -84,9 +84,9 @@ pub fn write_packed_array1(p: &mut BigPacked1) {
 }
 
 // CHECK-LABEL: @write_packed_array2
-// CHECK: store i32 0, {{i32\*|ptr}} %{{.+}}, align 2
-// CHECK: store i32 1, {{i32\*|ptr}} %{{.+}}, align 2
-// CHECK: store i32 2, {{i32\*|ptr}} %{{.+}}, align 2
+// CHECK: store i32 0, ptr %{{.+}}, align 2
+// CHECK: store i32 1, ptr %{{.+}}, align 2
+// CHECK: store i32 2, ptr %{{.+}}, align 2
 #[no_mangle]
 pub fn write_packed_array2(p: &mut BigPacked2) {
     p.data.0[0] = 0;
@@ -95,14 +95,14 @@ pub fn write_packed_array2(p: &mut BigPacked2) {
 }
 
 // CHECK-LABEL: @repeat_packed_array1
-// CHECK: store i32 42, {{i32\*|ptr}} %{{.+}}, align 1
+// CHECK: store i32 42, ptr %{{.+}}, align 1
 #[no_mangle]
 pub fn repeat_packed_array1(p: &mut BigPacked1) {
     p.data.0 = [42; 8];
 }
 
 // CHECK-LABEL: @repeat_packed_array2
-// CHECK: store i32 42, {{i32\*|ptr}} %{{.+}}, align 2
+// CHECK: store i32 42, ptr %{{.+}}, align 2
 #[no_mangle]
 pub fn repeat_packed_array2(p: &mut BigPacked2) {
     p.data.0 = [42; 8];
@@ -119,14 +119,14 @@ pub struct Packed2Pair(u8, u32);
 // CHECK-LABEL: @pkd1_pair
 #[no_mangle]
 pub fn pkd1_pair(pair1: &mut Packed1Pair, pair2: &mut Packed1Pair) {
-// CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 1 %{{.*}}, {{i8\*|ptr}} align 1 %{{.*}}, i{{[0-9]+}} 5, i1 false)
+// CHECK: call void @llvm.memcpy.{{.*}}(ptr align 1 %{{.*}}, ptr align 1 %{{.*}}, i{{[0-9]+}} 5, i1 false)
     *pair2 = *pair1;
 }
 
 // CHECK-LABEL: @pkd2_pair
 #[no_mangle]
 pub fn pkd2_pair(pair1: &mut Packed2Pair, pair2: &mut Packed2Pair) {
-// CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 2 %{{.*}}, {{i8\*|ptr}} align 2 %{{.*}}, i{{[0-9]+}} 6, i1 false)
+// CHECK: call void @llvm.memcpy.{{.*}}(ptr align 2 %{{.*}}, ptr align 2 %{{.*}}, i{{[0-9]+}} 6, i1 false)
     *pair2 = *pair1;
 }
 
@@ -141,13 +141,13 @@ pub struct Packed2NestedPair((u32, u32));
 // CHECK-LABEL: @pkd1_nested_pair
 #[no_mangle]
 pub fn pkd1_nested_pair(pair1: &mut Packed1NestedPair, pair2: &mut Packed1NestedPair) {
-// CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 1 %{{.*}}, {{i8\*|ptr}} align 1 %{{.*}}, i{{[0-9]+}} 8, i1 false)
+// CHECK: call void @llvm.memcpy.{{.*}}(ptr align 1 %{{.*}}, ptr align 1 %{{.*}}, i{{[0-9]+}} 8, i1 false)
     *pair2 = *pair1;
 }
 
 // CHECK-LABEL: @pkd2_nested_pair
 #[no_mangle]
 pub fn pkd2_nested_pair(pair1: &mut Packed2NestedPair, pair2: &mut Packed2NestedPair) {
-// CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 2 %{{.*}}, {{i8\*|ptr}} align 2 %{{.*}}, i{{[0-9]+}} 8, i1 false)
+// CHECK: call void @llvm.memcpy.{{.*}}(ptr align 2 %{{.*}}, ptr align 2 %{{.*}}, i{{[0-9]+}} 8, i1 false)
     *pair2 = *pair1;
 }