Skip to content

Commit

Permalink
Fix/bless tests broken by DSE
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobDegen committed May 25, 2022
1 parent bf153a2 commit 8d6d8f0
Show file tree
Hide file tree
Showing 42 changed files with 197 additions and 300 deletions.
1 change: 1 addition & 0 deletions src/test/codegen-units/item-collection/unsizing.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// compile-flags:-Zprint-mono-items=eager
// compile-flags:-Zinline-in-all-cgus
// compile-flags:-Zmir-opt-level=0

#![deny(dead_code)]
#![feature(coerce_unsized)]
Expand Down
6 changes: 3 additions & 3 deletions src/test/incremental/hashes/for_loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ pub fn change_loop_body() {
}

#[cfg(not(any(cfail1,cfail4)))]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail6")]
pub fn change_loop_body() {
let mut _x = 0;
Expand Down Expand Up @@ -183,7 +183,7 @@ pub fn add_loop_label_to_break() {
#[cfg(not(any(cfail1,cfail4)))]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail6")]
pub fn add_loop_label_to_break() {
let mut _x = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/test/incremental/hashes/let_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ pub fn change_initializer() {
}

#[cfg(not(any(cfail1,cfail4)))]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes,optimized_mir")]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes,optimized_mir")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail6")]
pub fn change_initializer() {
let _x = 5u16;
Expand Down
4 changes: 2 additions & 2 deletions src/test/incremental/hashes/loop_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ pub fn change_loop_body() {
}

#[cfg(not(any(cfail1,cfail4)))]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail6")]
pub fn change_loop_body() {
let mut _x = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/test/incremental/hashes/while_loops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ pub fn change_loop_body() {
}

#[cfg(not(any(cfail1,cfail4)))]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail6")]
pub fn change_loop_body() {
let mut _x = 0;
Expand All @@ -56,9 +56,9 @@ pub fn change_loop_condition() {
}

#[cfg(not(any(cfail1,cfail4)))]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail2", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail3")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes, optimized_mir")]
#[rustc_clean(cfg="cfail5", except="hir_owner_nodes")]
#[rustc_clean(cfg="cfail6")]
pub fn change_loop_condition() {
let mut _x = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ fn main() -> () {

bb0: {
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
_1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
_2 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
_3 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ fn main() -> () {

bb0: {
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
_1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
_2 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
_3 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
Expand Down
24 changes: 8 additions & 16 deletions src/test/mir-opt/dest-prop/branch.main.DestinationPropagation.diff
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,23 @@
let mut _3: bool; // in scope 0 at $DIR/branch.rs:15:16: 15:22
let _4: i32; // in scope 0 at $DIR/branch.rs:18:9: 18:14
scope 1 {
- debug x => _1; // in scope 1 at $DIR/branch.rs:13:9: 13:10
+ debug x => _2; // in scope 1 at $DIR/branch.rs:13:9: 13:10
debug x => _1; // in scope 1 at $DIR/branch.rs:13:9: 13:10
let _2: i32; // in scope 1 at $DIR/branch.rs:15:9: 15:10
scope 2 {
debug y => _2; // in scope 2 at $DIR/branch.rs:15:9: 15:10
}
}

bb0: {
- StorageLive(_1); // scope 0 at $DIR/branch.rs:13:9: 13:10
- _1 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
+ nop; // scope 0 at $DIR/branch.rs:13:9: 13:10
+ _2 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
StorageLive(_1); // scope 0 at $DIR/branch.rs:13:9: 13:10
_1 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
// mir::Constant
// + span: $DIR/branch.rs:13:13: 13:16
// + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
}

bb1: {
- StorageLive(_2); // scope 1 at $DIR/branch.rs:15:9: 15:10
+ nop; // scope 1 at $DIR/branch.rs:15:9: 15:10
StorageLive(_2); // scope 1 at $DIR/branch.rs:15:9: 15:10
StorageLive(_3); // scope 1 at $DIR/branch.rs:15:16: 15:22
_3 = cond() -> bb2; // scope 1 at $DIR/branch.rs:15:16: 15:22
// mir::Constant
Expand All @@ -40,8 +36,7 @@
}

bb3: {
- _2 = _1; // scope 1 at $DIR/branch.rs:16:9: 16:10
+ nop; // scope 1 at $DIR/branch.rs:16:9: 16:10
nop; // scope 1 at $DIR/branch.rs:16:9: 16:10
goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6
}

Expand All @@ -55,18 +50,15 @@

bb5: {
StorageDead(_4); // scope 1 at $DIR/branch.rs:18:14: 18:15
- _2 = _1; // scope 1 at $DIR/branch.rs:19:9: 19:10
+ nop; // scope 1 at $DIR/branch.rs:19:9: 19:10
nop; // scope 1 at $DIR/branch.rs:19:9: 19:10
goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6
}

bb6: {
StorageDead(_3); // scope 1 at $DIR/branch.rs:20:5: 20:6
nop; // scope 0 at $DIR/branch.rs:12:11: 21:2
- StorageDead(_2); // scope 1 at $DIR/branch.rs:21:1: 21:2
- StorageDead(_1); // scope 0 at $DIR/branch.rs:21:1: 21:2
+ nop; // scope 1 at $DIR/branch.rs:21:1: 21:2
+ nop; // scope 0 at $DIR/branch.rs:21:1: 21:2
StorageDead(_2); // scope 1 at $DIR/branch.rs:21:1: 21:2
StorageDead(_1); // scope 0 at $DIR/branch.rs:21:1: 21:2
return; // scope 0 at $DIR/branch.rs:21:2: 21:2
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- _2 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:28:9: 28:10
+ _0 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:28:13: 28:14
_1 = const 123_i32; // scope 1 at $DIR/copy_propagation_arg.rs:29:5: 29:12
nop; // scope 1 at $DIR/copy_propagation_arg.rs:29:5: 29:12
- _0 = _2; // scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6
- StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:31:1: 31:2
+ nop; // scope 1 at $DIR/copy_propagation_arg.rs:30:5: 30:6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
bb1: {
StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:16:12: 16:13
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:16:13: 16:14
_1 = const 5_u8; // scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10
nop; // scope 0 at $DIR/copy_propagation_arg.rs:17:5: 17:10
nop; // scope 0 at $DIR/copy_propagation_arg.rs:15:19: 18:2
return; // scope 0 at $DIR/copy_propagation_arg.rs:18:2: 18:2
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
let mut _2: i32; // in scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10

bb0: {
- StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
- _2 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
- _1 = move _2; // scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10
- StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
nop; // scope 0 at $DIR/copy_propagation_arg.rs:23:5: 23:10
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:23:9: 23:10
nop; // scope 0 at $DIR/copy_propagation_arg.rs:21:20: 24:2
return; // scope 0 at $DIR/copy_propagation_arg.rs:24:2: 24:2
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,19 @@
let mut _3: u8; // in scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16

bb0: {
- StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
StorageLive(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
StorageLive(_3); // scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
_3 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:11:15: 11:16
- _2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
+ _1 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
_2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:11:9: 11:17
// mir::Constant
// + span: $DIR/copy_propagation_arg.rs:11:9: 11:14
// + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(Scalar(<ZST>)) }
}

bb1: {
StorageDead(_3); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
- _1 = move _2; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
- StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
nop; // scope 0 at $DIR/copy_propagation_arg.rs:11:5: 11:17
StorageDead(_2); // scope 0 at $DIR/copy_propagation_arg.rs:11:16: 11:17
nop; // scope 0 at $DIR/copy_propagation_arg.rs:9:19: 12:2
return; // scope 0 at $DIR/copy_propagation_arg.rs:12:2: 12:2
}
Expand Down
51 changes: 17 additions & 34 deletions src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@
let _5: (); // in scope 0 at $DIR/cycle.rs:14:5: 14:12
let mut _6: i32; // in scope 0 at $DIR/cycle.rs:14:10: 14:11
scope 1 {
- debug x => _1; // in scope 1 at $DIR/cycle.rs:9:9: 9:14
+ debug x => _4; // in scope 1 at $DIR/cycle.rs:9:9: 9:14
debug x => _1; // in scope 1 at $DIR/cycle.rs:9:9: 9:14
let _2: i32; // in scope 1 at $DIR/cycle.rs:10:9: 10:10
scope 2 {
- debug y => _2; // in scope 2 at $DIR/cycle.rs:10:9: 10:10
+ debug y => _4; // in scope 2 at $DIR/cycle.rs:10:9: 10:10
debug y => _2; // in scope 2 at $DIR/cycle.rs:10:9: 10:10
let _3: i32; // in scope 2 at $DIR/cycle.rs:11:9: 11:10
scope 3 {
- debug z => _3; // in scope 3 at $DIR/cycle.rs:11:9: 11:10
+ debug z => _4; // in scope 3 at $DIR/cycle.rs:11:9: 11:10
debug z => _3; // in scope 3 at $DIR/cycle.rs:11:9: 11:10
scope 4 (inlined std::mem::drop::<i32>) { // at $DIR/cycle.rs:14:5: 14:12
debug _x => _6; // in scope 4 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
}
Expand All @@ -26,44 +23,30 @@
}

bb0: {
- StorageLive(_1); // scope 0 at $DIR/cycle.rs:9:9: 9:14
- _1 = val() -> bb1; // scope 0 at $DIR/cycle.rs:9:17: 9:22
+ nop; // scope 0 at $DIR/cycle.rs:9:9: 9:14
+ _4 = val() -> bb1; // scope 0 at $DIR/cycle.rs:9:17: 9:22
StorageLive(_1); // scope 0 at $DIR/cycle.rs:9:9: 9:14
_1 = val() -> bb1; // scope 0 at $DIR/cycle.rs:9:17: 9:22
// mir::Constant
// + span: $DIR/cycle.rs:9:17: 9:20
// + literal: Const { ty: fn() -> i32 {val}, val: Value(Scalar(<ZST>)) }
}

bb1: {
- StorageLive(_2); // scope 1 at $DIR/cycle.rs:10:9: 10:10
- _2 = _1; // scope 1 at $DIR/cycle.rs:10:13: 10:14
- StorageLive(_3); // scope 2 at $DIR/cycle.rs:11:9: 11:10
- _3 = _2; // scope 2 at $DIR/cycle.rs:11:13: 11:14
- StorageLive(_4); // scope 3 at $DIR/cycle.rs:12:9: 12:10
- _4 = _3; // scope 3 at $DIR/cycle.rs:12:9: 12:10
- _1 = move _4; // scope 3 at $DIR/cycle.rs:12:5: 12:10
- StorageDead(_4); // scope 3 at $DIR/cycle.rs:12:9: 12:10
+ nop; // scope 1 at $DIR/cycle.rs:10:9: 10:10
+ nop; // scope 1 at $DIR/cycle.rs:10:13: 10:14
+ nop; // scope 2 at $DIR/cycle.rs:11:9: 11:10
+ nop; // scope 2 at $DIR/cycle.rs:11:13: 11:14
+ nop; // scope 3 at $DIR/cycle.rs:12:9: 12:10
+ nop; // scope 3 at $DIR/cycle.rs:12:9: 12:10
+ nop; // scope 3 at $DIR/cycle.rs:12:5: 12:10
+ nop; // scope 3 at $DIR/cycle.rs:12:9: 12:10
StorageLive(_2); // scope 1 at $DIR/cycle.rs:10:9: 10:10
nop; // scope 1 at $DIR/cycle.rs:10:13: 10:14
StorageLive(_3); // scope 2 at $DIR/cycle.rs:11:9: 11:10
nop; // scope 2 at $DIR/cycle.rs:11:13: 11:14
StorageLive(_4); // scope 3 at $DIR/cycle.rs:12:9: 12:10
nop; // scope 3 at $DIR/cycle.rs:12:9: 12:10
nop; // scope 3 at $DIR/cycle.rs:12:5: 12:10
StorageDead(_4); // scope 3 at $DIR/cycle.rs:12:9: 12:10
StorageLive(_5); // scope 3 at $DIR/cycle.rs:14:5: 14:12
StorageLive(_6); // scope 3 at $DIR/cycle.rs:14:10: 14:11
- _6 = _1; // scope 3 at $DIR/cycle.rs:14:10: 14:11
+ _6 = _4; // scope 3 at $DIR/cycle.rs:14:10: 14:11
nop; // scope 3 at $DIR/cycle.rs:14:10: 14:11
StorageDead(_6); // scope 3 at $DIR/cycle.rs:14:11: 14:12
StorageDead(_5); // scope 3 at $DIR/cycle.rs:14:12: 14:13
- StorageDead(_3); // scope 2 at $DIR/cycle.rs:15:1: 15:2
- StorageDead(_2); // scope 1 at $DIR/cycle.rs:15:1: 15:2
- StorageDead(_1); // scope 0 at $DIR/cycle.rs:15:1: 15:2
+ nop; // scope 2 at $DIR/cycle.rs:15:1: 15:2
+ nop; // scope 1 at $DIR/cycle.rs:15:1: 15:2
+ nop; // scope 0 at $DIR/cycle.rs:15:1: 15:2
StorageDead(_3); // scope 2 at $DIR/cycle.rs:15:1: 15:2
StorageDead(_2); // scope 1 at $DIR/cycle.rs:15:1: 15:2
StorageDead(_1); // scope 0 at $DIR/cycle.rs:15:1: 15:2
return; // scope 0 at $DIR/cycle.rs:15:2: 15:2
}
}
Expand Down
Loading

0 comments on commit 8d6d8f0

Please sign in to comment.