Auto merge of #122645 - saethlin:portable-mir-opt-tests, r=Nadrieril

Remove some only- clauses from mir-opt tests

Derived from https://github.com/rust-lang/rust/pull/122295

Many of these tests were originally codegen tests, and MIR is more trivially portable than LLVM IR. We simply don't need to restrict the platform in most cases.

r? Nadrieril
This commit is contained in:
bors 2024-03-19 06:56:49 +00:00
commit 91b87c4f45
11 changed files with 3 additions and 13 deletions

View file

@ -1,9 +1,8 @@
//! Tests that unwinding from an asm block is caught and forced to abort
//! when `-C panic=abort`.
//@ only-x86_64
//@ compile-flags: -C panic=abort
//@ no-prefer-dynamic
//@ needs-asm-support
#![feature(asm_unwind)]

View file

@ -1,7 +1,6 @@
// skip-filecheck
//@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
//@ needs-unwind
//@ only-x86_64
#![crate_type = "lib"]
#![feature(step_trait)]

View file

@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
//@ only-64bit
// Checks that we do not have any branches in the MIR for the two tested functions.

View file

@ -1,7 +1,6 @@
// skip-filecheck
//@ compile-flags: -O -Zmir-opt-level=2 -g
//@ needs-unwind
//@ only-64bit
#![crate_type = "lib"]

View file

@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir
//@ only-64bit
//@ ignore-debug the standard library debug assertions leak into this test
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

View file

@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
//@ only-64bit
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
#![crate_type = "lib"]

View file

@ -3,9 +3,9 @@
fn ezmap(_1: Option<i32>) -> Option<i32> {
debug x => _1;
let mut _0: std::option::Option<i32>;
scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:18:12: 18:15}>) {
scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:17:12: 17:15}>) {
debug slf => _1;
debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:18:12: 18:15};
debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:17:12: 17:15};
let mut _2: isize;
let _3: i32;
let mut _4: i32;

View file

@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
//@ only-64bit
#[inline(always)]
fn map<T, U, F>(slf: Option<T>, f: F) -> Option<U>

View file

@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
//@ only-64bit
//@ ignore-debug the standard library debug assertions leak into this test
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

View file

@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
//@ only-64bit
//@ ignore-debug the standard library debug assertions leak into this test
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY

View file

@ -1,6 +1,5 @@
// skip-filecheck
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
//@ only-64bit
// Track the status of MIR optimizations simplifying `Ok(res?)` for both the old and new desugarings
// of that syntax.