diff options
Diffstat (limited to 'src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir')
| -rw-r--r-- | src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir b/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir new file mode 100644 index 00000000000..8fadcb8c12f --- /dev/null +++ b/src/test/mir-opt/while-storage/rustc.while_loop.PreCodegen.after.mir @@ -0,0 +1,62 @@ +// MIR for `while_loop` after PreCodegen + +fn while_loop(_1: bool) -> () { + debug c => _1; // in scope 0 at $DIR/while-storage.rs:9:15: 9:16 + let mut _0: (); // return place in scope 0 at $DIR/while-storage.rs:9:24: 9:24 + let mut _2: bool; // in scope 0 at $DIR/while-storage.rs:10:11: 10:22 + let mut _3: bool; // in scope 0 at $DIR/while-storage.rs:10:20: 10:21 + let mut _4: bool; // in scope 0 at $DIR/while-storage.rs:11:12: 11:23 + let mut _5: bool; // in scope 0 at $DIR/while-storage.rs:11:21: 11:22 + + bb0: { + StorageLive(_2); // bb0[0]: scope 0 at $DIR/while-storage.rs:10:11: 10:22 + StorageLive(_3); // bb0[1]: scope 0 at $DIR/while-storage.rs:10:20: 10:21 + _3 = _1; // bb0[2]: scope 0 at $DIR/while-storage.rs:10:20: 10:21 + _2 = const get_bool(move _3) -> bb1; // bb0[3]: scope 0 at $DIR/while-storage.rs:10:11: 10:22 + // ty::Const + // + ty: fn(bool) -> bool {get_bool} + // + val: Value(Scalar(<ZST>)) + // mir::Constant + // + span: $DIR/while-storage.rs:10:11: 10:19 + // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar(<ZST>)) } + } + + bb1: { + StorageDead(_3); // bb1[0]: scope 0 at $DIR/while-storage.rs:10:21: 10:22 + switchInt(_2) -> [false: bb6, otherwise: bb2]; // bb1[1]: scope 0 at $DIR/while-storage.rs:10:5: 14:6 + } + + bb2: { + StorageLive(_4); // bb2[0]: scope 0 at $DIR/while-storage.rs:11:12: 11:23 + StorageLive(_5); // bb2[1]: scope 0 at $DIR/while-storage.rs:11:21: 11:22 + _5 = _1; // bb2[2]: scope 0 at $DIR/while-storage.rs:11:21: 11:22 + _4 = const get_bool(move _5) -> bb3; // bb2[3]: scope 0 at $DIR/while-storage.rs:11:12: 11:23 + // ty::Const + // + ty: fn(bool) -> bool {get_bool} + // + val: Value(Scalar(<ZST>)) + // mir::Constant + // + span: $DIR/while-storage.rs:11:12: 11:20 + // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(Scalar(<ZST>)) } + } + + bb3: { + StorageDead(_5); // bb3[0]: scope 0 at $DIR/while-storage.rs:11:22: 11:23 + switchInt(_4) -> [false: bb4, otherwise: bb5]; // bb3[1]: scope 0 at $DIR/while-storage.rs:11:9: 13:10 + } + + bb4: { + StorageDead(_4); // bb4[0]: scope 0 at $DIR/while-storage.rs:14:5: 14:6 + StorageDead(_2); // bb4[1]: scope 0 at $DIR/while-storage.rs:10:21: 10:22 + goto -> bb0; // bb4[2]: scope 0 at $DIR/while-storage.rs:10:5: 14:6 + } + + bb5: { + StorageDead(_4); // bb5[0]: scope 0 at $DIR/while-storage.rs:14:5: 14:6 + goto -> bb6; // bb5[1]: scope 0 at $DIR/while-storage.rs:12:13: 12:18 + } + + bb6: { + StorageDead(_2); // bb6[0]: scope 0 at $DIR/while-storage.rs:10:21: 10:22 + return; // bb6[1]: scope 0 at $DIR/while-storage.rs:15:2: 15:2 + } +} |
