diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2021-11-30 18:54:37 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2021-11-30 18:54:37 -0800 |
| commit | 9aaca1d38ea3218b7f5030bd486cbbdf8917985b (patch) | |
| tree | bd55c3a117ecee08a66c266defbe9489e1d253a2 /src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff | |
| parent | 58c996c3a768446a39d72265bac626bc0a89adee (diff) | |
| download | rust-9aaca1d38ea3218b7f5030bd486cbbdf8917985b.tar.gz rust-9aaca1d38ea3218b7f5030bd486cbbdf8917985b.zip | |
Update MIR opt tests with new name
Diffstat (limited to 'src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff')
| -rw-r--r-- | src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff b/src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff new file mode 100644 index 00000000000..d11c70b1efe --- /dev/null +++ b/src/test/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.diff @@ -0,0 +1,40 @@ +- // MIR for `main` before SimplifyConstCondition-after-const-prop ++ // MIR for `main` after SimplifyConstCondition-after-const-prop + + fn main() -> () { + let mut _0: (); // return place in scope 0 at $DIR/simplify_if.rs:5:11: 5:11 + let mut _1: bool; // in scope 0 at $DIR/simplify_if.rs:6:8: 6:13 + let _2: (); // in scope 0 at $DIR/simplify_if.rs:7:9: 7:15 + + bb0: { + StorageLive(_1); // scope 0 at $DIR/simplify_if.rs:6:8: 6:13 + _1 = const false; // scope 0 at $DIR/simplify_if.rs:6:8: 6:13 +- switchInt(const false) -> [false: bb3, otherwise: bb1]; // scope 0 at $DIR/simplify_if.rs:6:8: 6:13 ++ goto -> bb3; // scope 0 at $DIR/simplify_if.rs:6:8: 6:13 + } + + bb1: { + StorageLive(_2); // scope 0 at $DIR/simplify_if.rs:7:9: 7:15 + _2 = noop() -> bb2; // scope 0 at $DIR/simplify_if.rs:7:9: 7:15 + // mir::Constant + // + span: $DIR/simplify_if.rs:7:9: 7:13 + // + literal: Const { ty: fn() {noop}, val: Value(Scalar(<ZST>)) } + } + + bb2: { + StorageDead(_2); // scope 0 at $DIR/simplify_if.rs:7:15: 7:16 + nop; // scope 0 at $DIR/simplify_if.rs:6:14: 8:6 + goto -> bb4; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6 + } + + bb3: { + nop; // scope 0 at $DIR/simplify_if.rs:8:6: 8:6 + goto -> bb4; // scope 0 at $DIR/simplify_if.rs:6:5: 8:6 + } + + bb4: { + StorageDead(_1); // scope 0 at $DIR/simplify_if.rs:8:5: 8:6 + return; // scope 0 at $DIR/simplify_if.rs:9:2: 9:2 + } + } + |
