Skip to content

Commit 36006b2

Browse files
authored
Rollup 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 8697d8f + 6828f0c commit 36006b2

11 files changed

+2
-12
lines changed

tests/mir-opt/asm_unwind_panic_abort.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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
65
//@ no-prefer-dynamic
76

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)