Update test results
This commit is contained in:
parent
56ff16d19f
commit
93ee806233
@ -0,0 +1,34 @@
|
|||||||
|
- // MIR for `f` before DataflowConstProp
|
||||||
|
+ // MIR for `f` after DataflowConstProp
|
||||||
|
|
||||||
|
fn f() -> usize {
|
||||||
|
let mut _0: usize; // return place in scope 0 at $DIR/issue_81605.rs:+0:11: +0:16
|
||||||
|
let mut _1: usize; // in scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
|
||||||
|
let mut _2: bool; // in scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
|
||||||
|
|
||||||
|
bb0: {
|
||||||
|
StorageLive(_1); // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
|
||||||
|
StorageLive(_2); // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
|
||||||
|
_2 = const true; // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
|
||||||
|
- switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
|
||||||
|
+ switchInt(const true) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/issue_81605.rs:+1:12: +1:16
|
||||||
|
}
|
||||||
|
|
||||||
|
bb1: {
|
||||||
|
_1 = const 1_usize; // scope 0 at $DIR/issue_81605.rs:+1:19: +1:20
|
||||||
|
goto -> bb3; // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
|
||||||
|
}
|
||||||
|
|
||||||
|
bb2: {
|
||||||
|
_1 = const 2_usize; // scope 0 at $DIR/issue_81605.rs:+1:30: +1:31
|
||||||
|
goto -> bb3; // scope 0 at $DIR/issue_81605.rs:+1:9: +1:33
|
||||||
|
}
|
||||||
|
|
||||||
|
bb3: {
|
||||||
|
StorageDead(_2); // scope 0 at $DIR/issue_81605.rs:+1:32: +1:33
|
||||||
|
_0 = Add(const 1_usize, move _1); // scope 0 at $DIR/issue_81605.rs:+1:5: +1:33
|
||||||
|
StorageDead(_1); // scope 0 at $DIR/issue_81605.rs:+1:32: +1:33
|
||||||
|
return; // scope 0 at $DIR/issue_81605.rs:+2:2: +2:2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
10
src/test/mir-opt/dataflow-const-prop/issue_81605.rs
Normal file
10
src/test/mir-opt/dataflow-const-prop/issue_81605.rs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// unit-test: DataflowConstProp
|
||||||
|
|
||||||
|
// EMIT_MIR issue_81605.f.DataflowConstProp.diff
|
||||||
|
fn f() -> usize {
|
||||||
|
1 + if true { 1 } else { 2 }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
f();
|
||||||
|
}
|
@ -104,19 +104,15 @@
|
|||||||
StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
StorageLive(_15); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
StorageLive(_16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
StorageLive(_16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
StorageLive(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
StorageLive(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
- _17 = (*_13); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_17 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
+ _17 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
||||||
StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
StorageLive(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
_18 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_18 = const 1_i32; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
- _16 = Eq(move _17, const 1_i32); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_16 = const true; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
+ _16 = const true; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
||||||
StorageDead(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
StorageDead(_18); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
StorageDead(_17); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
- _15 = Not(move _16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
_15 = const false; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
+ _15 = const false; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
||||||
StorageDead(_16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
StorageDead(_16); // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
- switchInt(move _15) -> [false: bb5, otherwise: bb4]; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
goto -> bb5; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||||
+ goto -> bb5; // scope 4 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb4: {
|
bb4: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user