about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2024-05-03 05:03:41 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2024-05-03 05:03:41 +0000
commit3e2164fef272ba5fe9c08be264677d348cf50c3a (patch)
tree17a62ce597923eb94a6fc85099d0403288e38ec1 /tests/codegen
parentaeef18043eba235bb4bc74f169ee92ffaa3024db (diff)
parentf43e3e2023f28d7e7a9f870612c6f2ef867a2acb (diff)
downloadrust-3e2164fef272ba5fe9c08be264677d348cf50c3a.tar.gz
rust-3e2164fef272ba5fe9c08be264677d348cf50c3a.zip
Merge from rustc
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/enum/enum-match.rs6
-rw-r--r--tests/codegen/ptr-read-metadata.rs6
-rw-r--r--tests/codegen/target-feature-inline-closure.rs3
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/codegen/enum/enum-match.rs b/tests/codegen/enum/enum-match.rs
index f1c40f6695b..ced26c0a434 100644
--- a/tests/codegen/enum/enum-match.rs
+++ b/tests/codegen/enum/enum-match.rs
@@ -11,7 +11,7 @@ pub enum Enum0 {
     B,
 }
 
-// CHECK: define noundef i8 @match0{{.*}}
+// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match0{{.*}}
 // CHECK-NEXT: start:
 // CHECK-NEXT: %1 = icmp eq i8 %0, 2
 // CHECK-NEXT: %2 = and i8 %0, 1
@@ -32,7 +32,7 @@ pub enum Enum1 {
     C,
 }
 
-// CHECK: define noundef i8 @match1{{.*}}
+// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match1{{.*}}
 // CHECK-NEXT: start:
 // CHECK-NEXT: %1 = add i8 %0, -2
 // CHECK-NEXT: %2 = zext i8 %1 to i64
@@ -91,7 +91,7 @@ pub enum Enum2 {
     E,
 }
 
-// CHECK: define noundef i8 @match2{{.*}}
+// CHECK: define noundef{{( range\(i8 [0-9]+, [0-9]+\))?}} i8 @match2{{.*}}
 // CHECK-NEXT: start:
 // CHECK-NEXT: %1 = add i8 %0, 2
 // CHECK-NEXT: %2 = zext i8 %1 to i64
diff --git a/tests/codegen/ptr-read-metadata.rs b/tests/codegen/ptr-read-metadata.rs
index 4c623dee5e1..e3565c962f7 100644
--- a/tests/codegen/ptr-read-metadata.rs
+++ b/tests/codegen/ptr-read-metadata.rs
@@ -47,7 +47,7 @@ pub unsafe fn read_byte_assume_init(p: &MaybeUninit<u8>) -> u8 {
     p.assume_init_read()
 }
 
-// CHECK-LABEL: define {{(dso_local )?}}noundef i32 @copy_char(
+// CHECK-LABEL: define {{(dso_local )?}}noundef {{(range\(.*\) )?}}i32 @copy_char(
 #[no_mangle]
 pub unsafe fn copy_char(p: *const char) -> char {
     // CHECK-NOT: load
@@ -58,7 +58,7 @@ pub unsafe fn copy_char(p: *const char) -> char {
     *p
 }
 
-// CHECK-LABEL: define {{(dso_local )?}}noundef i32 @read_char(
+// CHECK-LABEL: define {{(dso_local )?}}noundef {{(range\(.*\) )?}}i32 @read_char(
 #[no_mangle]
 pub unsafe fn read_char(p: *const char) -> char {
     // CHECK-NOT: load
@@ -80,7 +80,7 @@ pub unsafe fn read_char_maybe_uninit(p: *const MaybeUninit<char>) -> MaybeUninit
     p.read()
 }
 
-// CHECK-LABEL: define {{(dso_local )?}}noundef i32 @read_char_assume_init(
+// CHECK-LABEL: define {{(dso_local )?}}noundef {{(range\(.*\) )?}}i32 @read_char_assume_init(
 #[no_mangle]
 pub unsafe fn read_char_assume_init(p: &MaybeUninit<char>) -> char {
     // CHECK-NOT: load
diff --git a/tests/codegen/target-feature-inline-closure.rs b/tests/codegen/target-feature-inline-closure.rs
index 88bd413a870..d973bd93e31 100644
--- a/tests/codegen/target-feature-inline-closure.rs
+++ b/tests/codegen/target-feature-inline-closure.rs
@@ -1,5 +1,6 @@
 //@ only-x86_64
-//@ compile-flags: -Copt-level=3
+// Set the base cpu explicitly, in case the default has been changed.
+//@ compile-flags: -Copt-level=3 -Ctarget-cpu=x86-64
 
 #![crate_type = "lib"]
 #![feature(target_feature_11)]