about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/codegen/dst-vtable-align-nonzero.rs6
-rw-r--r--src/test/codegen/dst-vtable-size-range.rs6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/test/codegen/dst-vtable-align-nonzero.rs b/src/test/codegen/dst-vtable-align-nonzero.rs
index 7ebb4173d56..54f6e7f992f 100644
--- a/src/test/codegen/dst-vtable-align-nonzero.rs
+++ b/src/test/codegen/dst-vtable-align-nonzero.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+// compile-flags: -O -Z merge-functions=disabled
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
@@ -55,9 +55,7 @@ pub fn align_load_from_align_of_val(x: &dyn Trait) -> usize {
 pub unsafe fn align_load_from_vtable_align_intrinsic(x: &dyn Trait) -> usize {
     let (data, vtable): (*const (), *const ()) = core::mem::transmute(x);
     // CHECK: {{%[0-9]+}} = load [[USIZE]], {{.+}} !range [[RANGE_META]]
-    let align = core::intrinsics::vtable_align(vtable);
-    // make this function unique so it doesn't get merged with the previous
-    align + 1
+    core::intrinsics::vtable_align(vtable)
 }
 
 // CHECK: [[RANGE_META]] = !{[[USIZE]] 1, [[USIZE]] 0}
diff --git a/src/test/codegen/dst-vtable-size-range.rs b/src/test/codegen/dst-vtable-size-range.rs
index cec5876b348..671c8abdebd 100644
--- a/src/test/codegen/dst-vtable-size-range.rs
+++ b/src/test/codegen/dst-vtable-size-range.rs
@@ -1,4 +1,4 @@
-// compile-flags: -O
+// compile-flags: -O -Z merge-functions=disabled
 
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
@@ -29,9 +29,7 @@ pub fn size_load_from_size_of_val(x: &dyn Trait) -> usize {
 pub unsafe fn size_load_from_vtable_size_intrinsic(x: &dyn Trait) -> usize {
     let (data, vtable): (*const (), *const ()) = core::mem::transmute(x);
     // CHECK: {{%[0-9]+}} = load [[USIZE]], {{.+}} !range [[RANGE_META]]
-    let size = core::intrinsics::vtable_size(vtable);
-    // make this function unique so it doesn't get merged with the previous
-    size + 1
+    core::intrinsics::vtable_size(vtable)
 }
 
 // CHECK: [[RANGE_META]] = !{[[USIZE]] 0, [[USIZE]] [[EXCLUSIVE_BOUND]]}