diff options
| author | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2022-02-26 12:52:07 -0500 |
|---|---|---|
| committer | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2022-02-27 23:11:03 -0500 |
| commit | 851fcc7a54262748b1aa9e16de91453998d896f3 (patch) | |
| tree | b4d47e400cc99387bb3a43c9a3d2e86e4a26b537 /src/test/codegen | |
| parent | 3b1fe7e7c95e14dd8a420edf2f8a160c70211e04 (diff) | |
Revert "Auto merge of #92419 - erikdesjardins:coldland, r=nagisa"
This reverts commit 4f49627c6fe2a32d1fed6310466bb0e1c535c0c0, reversing changes made to 028c6f1454787c068ff5117e9000a1de4fd98374.
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/unwind-landingpad-cold.rs | 15 | ||||
| -rw-r--r-- | src/test/codegen/unwind-landingpad-inline.rs | 37 |
2 files changed, 0 insertions, 52 deletions
diff --git a/src/test/codegen/unwind-landingpad-cold.rs b/src/test/codegen/unwind-landingpad-cold.rs deleted file mode 100644 index aa00b793654..00000000000 --- a/src/test/codegen/unwind-landingpad-cold.rs +++ /dev/null @@ -1,15 +0,0 @@ -// no-system-llvm: needs #92110 -// compile-flags: -Cno-prepopulate-passes -#![crate_type = "lib"] - -// This test checks that drop calls in unwind landing pads -// get the `cold` attribute. - -// CHECK-LABEL: @check_cold -// CHECK: {{(call|invoke) void .+}}drop_in_place{{.+}} [[ATTRIBUTES:#[0-9]+]] -// CHECK: attributes [[ATTRIBUTES]] = { cold } -#[no_mangle] -pub fn check_cold(f: fn(), x: Box<u32>) { - // this may unwind - f(); -} diff --git a/src/test/codegen/unwind-landingpad-inline.rs b/src/test/codegen/unwind-landingpad-inline.rs deleted file mode 100644 index ce78d075dd0..00000000000 --- a/src/test/codegen/unwind-landingpad-inline.rs +++ /dev/null @@ -1,37 +0,0 @@ -// no-system-llvm: needs #92110 + patch for Rust alloc/dealloc functions -// compile-flags: -Copt-level=3 -#![crate_type = "lib"] - -// This test checks that we can inline drop_in_place in -// unwind landing pads. - -// Without inlining, the box pointers escape via the call to drop_in_place, -// and LLVM will not optimize out the pointer comparison. -// With inlining, everything should be optimized out. -// See https://github.com/rust-lang/rust/issues/46515 -// CHECK-LABEL: @check_no_escape_in_landingpad -// CHECK: start: -// CHECK-NEXT: ret void -#[no_mangle] -pub fn check_no_escape_in_landingpad(f: fn()) { - let x = &*Box::new(0); - let y = &*Box::new(0); - - if x as *const _ == y as *const _ { - f(); - } -} - -// Without inlining, the compiler can't tell that -// dropping an empty string (in a landing pad) does nothing. -// With inlining, the landing pad should be optimized out. -// See https://github.com/rust-lang/rust/issues/87055 -// CHECK-LABEL: @check_eliminate_noop_drop -// CHECK: start: -// CHECK-NEXT: call void %g() -// CHECK-NEXT: ret void -#[no_mangle] -pub fn check_eliminate_noop_drop(g: fn()) { - let _var = String::new(); - g(); -} |
