diff options
Diffstat (limited to 'tests/mir-opt/pre-codegen')
19 files changed, 38 insertions, 24 deletions
diff --git a/tests/mir-opt/pre-codegen/chained_comparison.rs b/tests/mir-opt/pre-codegen/chained_comparison.rs index 43030041983..d1d400af22f 100644 --- a/tests/mir-opt/pre-codegen/chained_comparison.rs +++ b/tests/mir-opt/pre-codegen/chained_comparison.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/checked_ops.rs b/tests/mir-opt/pre-codegen/checked_ops.rs index 23d78e98777..d386219f4a6 100644 --- a/tests/mir-opt/pre-codegen/checked_ops.rs +++ b/tests/mir-opt/pre-codegen/checked_ops.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 // needs-unwind // only-x86_64 diff --git a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs index d8af6b14dad..b1a00d29372 100644 --- a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs +++ b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=0 // ignore-debug: standard library debug assertions add a panic that breaks this optimization diff --git a/tests/mir-opt/pre-codegen/intrinsics.rs b/tests/mir-opt/pre-codegen/intrinsics.rs index e32e04384c4..565bd89e571 100644 --- a/tests/mir-opt/pre-codegen/intrinsics.rs +++ b/tests/mir-opt/pre-codegen/intrinsics.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 // only-64bit diff --git a/tests/mir-opt/pre-codegen/loops.rs b/tests/mir-opt/pre-codegen/loops.rs index f3ba409229d..7f9c26f4fff 100644 --- a/tests/mir-opt/pre-codegen/loops.rs +++ b/tests/mir-opt/pre-codegen/loops.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -Zmir-opt-level=2 -g // needs-unwind diff --git a/tests/mir-opt/pre-codegen/mem_replace.rs b/tests/mir-opt/pre-codegen/mem_replace.rs index a139848bab2..18c4653d4c6 100644 --- a/tests/mir-opt/pre-codegen/mem_replace.rs +++ b/tests/mir-opt/pre-codegen/mem_replace.rs @@ -1,3 +1,4 @@ +// 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 diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs index 704f8f887e3..bb089ea4455 100644 --- a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs +++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs @@ -1,3 +1,4 @@ +// skip-filecheck // EMIT_MIR_FOR_EACH_PANIC_STRATEGY // compile-flags: -C overflow-checks=on diff --git a/tests/mir-opt/pre-codegen/range_iter.rs b/tests/mir-opt/pre-codegen/range_iter.rs index 9552144787d..80b1a5b2fa5 100644 --- a/tests/mir-opt/pre-codegen/range_iter.rs +++ b/tests/mir-opt/pre-codegen/range_iter.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 // only-64bit // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir index 80a470c9482..af5d385a979 100644 --- a/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir @@ -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:17:12: 17:15}>) { + scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:18:12: 18:15}>) { debug slf => _1; - debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:17:12: 17:15}; + debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:18:12: 18:15}; let mut _2: isize; let _3: i32; let mut _4: i32; diff --git a/tests/mir-opt/pre-codegen/simple_option_map.rs b/tests/mir-opt/pre-codegen/simple_option_map.rs index d4f28dda6c6..35f9ab3e154 100644 --- a/tests/mir-opt/pre-codegen/simple_option_map.rs +++ b/tests/mir-opt/pre-codegen/simple_option_map.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 // only-64bit diff --git a/tests/mir-opt/pre-codegen/slice_filter.rs b/tests/mir-opt/pre-codegen/slice_filter.rs index aba951acdd0..483e5876615 100644 --- a/tests/mir-opt/pre-codegen/slice_filter.rs +++ b/tests/mir-opt/pre-codegen/slice_filter.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 // ignore-debug: standard library debug assertions add a panic that breaks this optimization diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir index b35d3a105ba..548767dca0d 100644 --- a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir @@ -1,6 +1,6 @@ // MIR for `variant_a::{closure#0}` after PreCodegen -fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2: &&(usize, usize, usize, usize)) -> bool { +fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:8:25: 8:39}, _2: &&(usize, usize, usize, usize)) -> bool { let mut _0: bool; let mut _3: &(usize, usize, usize, usize); let _4: &usize; diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir index 80c8cebff45..e2ed1d101dc 100644 --- a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir @@ -1,6 +1,6 @@ // MIR for `variant_b::{closure#0}` after PreCodegen -fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41}, _2: &&(usize, usize, usize, usize)) -> bool { +fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:12:25: 12:41}, _2: &&(usize, usize, usize, usize)) -> bool { let mut _0: bool; let mut _3: &(usize, usize, usize, usize); let _4: usize; diff --git a/tests/mir-opt/pre-codegen/slice_index.rs b/tests/mir-opt/pre-codegen/slice_index.rs index 57ffb07e294..5225fc5c6e1 100644 --- a/tests/mir-opt/pre-codegen/slice_index.rs +++ b/tests/mir-opt/pre-codegen/slice_index.rs @@ -1,3 +1,4 @@ +// 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 diff --git a/tests/mir-opt/pre-codegen/slice_iter.rs b/tests/mir-opt/pre-codegen/slice_iter.rs index 1790056369c..10a5c3070d8 100644 --- a/tests/mir-opt/pre-codegen/slice_iter.rs +++ b/tests/mir-opt/pre-codegen/slice_iter.rs @@ -1,3 +1,4 @@ +// 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 diff --git a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir index 7af69e08ca1..485dc9179ce 100644 --- a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir +++ b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir @@ -1,18 +1,18 @@ // MIR for `outer` after PreCodegen fn outer(_1: u8) -> u8 { - debug v => _1; // in scope 0 at $DIR/spans.rs:9:14: 9:15 - let mut _0: u8; // return place in scope 0 at $DIR/spans.rs:9:24: 9:26 - let mut _2: &u8; // in scope 0 at $DIR/spans.rs:10:11: 10:13 - scope 1 (inlined inner) { // at $DIR/spans.rs:10:5: 10:14 - debug x => _2; // in scope 1 at $DIR/spans.rs:13:14: 13:15 + debug v => _1; // in scope 0 at $DIR/spans.rs:10:14: 10:15 + let mut _0: u8; // return place in scope 0 at $DIR/spans.rs:10:24: 10:26 + let mut _2: &u8; // in scope 0 at $DIR/spans.rs:11:11: 11:13 + scope 1 (inlined inner) { // at $DIR/spans.rs:11:5: 11:14 + debug x => _2; // in scope 1 at $DIR/spans.rs:14:14: 14:15 } bb0: { - StorageLive(_2); // scope 0 at $DIR/spans.rs:10:11: 10:13 - _2 = &_1; // scope 0 at $DIR/spans.rs:10:11: 10:13 - _0 = _1; // scope 1 at $DIR/spans.rs:14:5: 14:7 - StorageDead(_2); // scope 0 at $DIR/spans.rs:10:13: 10:14 - return; // scope 0 at $DIR/spans.rs:11:2: 11:2 + StorageLive(_2); // scope 0 at $DIR/spans.rs:11:11: 11:13 + _2 = &_1; // scope 0 at $DIR/spans.rs:11:11: 11:13 + _0 = _1; // scope 1 at $DIR/spans.rs:15:5: 15:7 + StorageDead(_2); // scope 0 at $DIR/spans.rs:11:13: 11:14 + return; // scope 0 at $DIR/spans.rs:12:2: 12:2 } } diff --git a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir index 7af69e08ca1..485dc9179ce 100644 --- a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir +++ b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir @@ -1,18 +1,18 @@ // MIR for `outer` after PreCodegen fn outer(_1: u8) -> u8 { - debug v => _1; // in scope 0 at $DIR/spans.rs:9:14: 9:15 - let mut _0: u8; // return place in scope 0 at $DIR/spans.rs:9:24: 9:26 - let mut _2: &u8; // in scope 0 at $DIR/spans.rs:10:11: 10:13 - scope 1 (inlined inner) { // at $DIR/spans.rs:10:5: 10:14 - debug x => _2; // in scope 1 at $DIR/spans.rs:13:14: 13:15 + debug v => _1; // in scope 0 at $DIR/spans.rs:10:14: 10:15 + let mut _0: u8; // return place in scope 0 at $DIR/spans.rs:10:24: 10:26 + let mut _2: &u8; // in scope 0 at $DIR/spans.rs:11:11: 11:13 + scope 1 (inlined inner) { // at $DIR/spans.rs:11:5: 11:14 + debug x => _2; // in scope 1 at $DIR/spans.rs:14:14: 14:15 } bb0: { - StorageLive(_2); // scope 0 at $DIR/spans.rs:10:11: 10:13 - _2 = &_1; // scope 0 at $DIR/spans.rs:10:11: 10:13 - _0 = _1; // scope 1 at $DIR/spans.rs:14:5: 14:7 - StorageDead(_2); // scope 0 at $DIR/spans.rs:10:13: 10:14 - return; // scope 0 at $DIR/spans.rs:11:2: 11:2 + StorageLive(_2); // scope 0 at $DIR/spans.rs:11:11: 11:13 + _2 = &_1; // scope 0 at $DIR/spans.rs:11:11: 11:13 + _0 = _1; // scope 1 at $DIR/spans.rs:15:5: 15:7 + StorageDead(_2); // scope 0 at $DIR/spans.rs:11:13: 11:14 + return; // scope 0 at $DIR/spans.rs:12:2: 12:2 } } diff --git a/tests/mir-opt/pre-codegen/spans.rs b/tests/mir-opt/pre-codegen/spans.rs index 295eb0476db..aa36648ce39 100644 --- a/tests/mir-opt/pre-codegen/spans.rs +++ b/tests/mir-opt/pre-codegen/spans.rs @@ -1,3 +1,4 @@ +// skip-filecheck // Test that the comments we emit in MIR opts are accurate. // // EMIT_MIR_FOR_EACH_PANIC_STRATEGY diff --git a/tests/mir-opt/pre-codegen/try_identity.rs b/tests/mir-opt/pre-codegen/try_identity.rs index a227c82d6a3..b6e4eaad7e1 100644 --- a/tests/mir-opt/pre-codegen/try_identity.rs +++ b/tests/mir-opt/pre-codegen/try_identity.rs @@ -1,3 +1,4 @@ +// skip-filecheck // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2 // only-64bit |
