Skip to content

Commit 91b87c4

Browse files
committed
Auto merge of rust-lang#122645 - saethlin:portable-mir-opt-tests, r=Nadrieril
Remove some only- clauses from mir-opt tests Derived from rust-lang#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
2 parents 196ff44 + 68f284f commit 91b87c4

11 files changed

+3
-13
lines changed

tests/mir-opt/asm_unwind_panic_abort.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//! Tests that unwinding from an asm block is caught and forced to abort
22
//! when `-C panic=abort`.
33
4-
//@ only-x86_64
54
//@ compile-flags: -C panic=abort
6-
//@ no-prefer-dynamic
5+
//@ needs-asm-support
76

87
#![feature(asm_unwind)]
98

tests/mir-opt/pre-codegen/checked_ops.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// skip-filecheck
22
//@ compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
33
//@ needs-unwind
4-
//@ only-x86_64
54

65
#![crate_type = "lib"]
76
#![feature(step_trait)]

tests/mir-opt/pre-codegen/intrinsics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// skip-filecheck
22
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
3-
//@ only-64bit
43

54
// Checks that we do not have any branches in the MIR for the two tested functions.
65

tests/mir-opt/pre-codegen/loops.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// skip-filecheck
22
//@ compile-flags: -O -Zmir-opt-level=2 -g
33
//@ needs-unwind
4-
//@ only-64bit
54

65
#![crate_type = "lib"]
76

tests/mir-opt/pre-codegen/mem_replace.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// skip-filecheck
22
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 -Zinline-mir
3-
//@ only-64bit
43
//@ ignore-debug the standard library debug assertions leak into this test
54
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
65

tests/mir-opt/pre-codegen/range_iter.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// skip-filecheck
22
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
3-
//@ only-64bit
43
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
54

65
#![crate_type = "lib"]

tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
fn ezmap(_1: Option<i32>) -> Option<i32> {
44
debug x => _1;
55
let mut _0: std::option::Option<i32>;
6-
scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:18:12: 18:15}>) {
6+
scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:17:12: 17:15}>) {
77
debug slf => _1;
8-
debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:18:12: 18:15};
8+
debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:17:12: 17:15};
99
let mut _2: isize;
1010
let _3: i32;
1111
let mut _4: i32;

tests/mir-opt/pre-codegen/simple_option_map.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// skip-filecheck
22
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
3-
//@ only-64bit
43

54
#[inline(always)]
65
fn map<T, U, F>(slf: Option<T>, f: F) -> Option<U>

tests/mir-opt/pre-codegen/slice_index.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// skip-filecheck
22
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
3-
//@ only-64bit
43
//@ ignore-debug the standard library debug assertions leak into this test
54
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
65

tests/mir-opt/pre-codegen/slice_iter.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// skip-filecheck
22
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
3-
//@ only-64bit
43
//@ ignore-debug the standard library debug assertions leak into this test
54
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
65

tests/mir-opt/pre-codegen/try_identity.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// skip-filecheck
22
//@ compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
3-
//@ only-64bit
43

54
// Track the status of MIR optimizations simplifying `Ok(res?)` for both the old and new desugarings
65
// of that syntax.

0 commit comments

Comments
 (0)