diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/mir-opt/loop_test.main.SimplifyCfg-promote-consts.after.mir | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/mir-opt/loop_test.main.SimplifyCfg-promote-consts.after.mir')
-rw-r--r-- | src/test/mir-opt/loop_test.main.SimplifyCfg-promote-consts.after.mir | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/test/mir-opt/loop_test.main.SimplifyCfg-promote-consts.after.mir b/src/test/mir-opt/loop_test.main.SimplifyCfg-promote-consts.after.mir new file mode 100644 index 000000000..5981ab885 --- /dev/null +++ b/src/test/mir-opt/loop_test.main.SimplifyCfg-promote-consts.after.mir @@ -0,0 +1,52 @@ +// MIR for `main` after SimplifyCfg-promote-consts + +fn main() -> () { + let mut _0: (); // return place in scope 0 at $DIR/loop_test.rs:+0:11: +0:11 + let _1: (); // in scope 0 at $DIR/loop_test.rs:+4:5: +6:6 + let mut _2: bool; // in scope 0 at $DIR/loop_test.rs:+4:8: +4:12 + let mut _3: !; // in scope 0 at $DIR/loop_test.rs:+4:13: +6:6 + let mut _4: !; // in scope 0 at $DIR/loop_test.rs:+7:5: +10:6 + let mut _5: (); // in scope 0 at $DIR/loop_test.rs:+0:1: +11:2 + let _6: i32; // in scope 0 at $DIR/loop_test.rs:+8:13: +8:14 + scope 1 { + debug x => _6; // in scope 1 at $DIR/loop_test.rs:+8:13: +8:14 + } + + bb0: { + StorageLive(_1); // scope 0 at $DIR/loop_test.rs:+4:5: +6:6 + StorageLive(_2); // scope 0 at $DIR/loop_test.rs:+4:8: +4:12 + _2 = const true; // scope 0 at $DIR/loop_test.rs:+4:8: +4:12 + switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/loop_test.rs:+4:8: +4:12 + } + + bb1: { + _0 = const (); // scope 0 at $DIR/loop_test.rs:+5:9: +5:15 + StorageDead(_2); // scope 0 at $DIR/loop_test.rs:+6:5: +6:6 + StorageDead(_1); // scope 0 at $DIR/loop_test.rs:+6:5: +6:6 + return; // scope 0 at $DIR/loop_test.rs:+11:2: +11:2 + } + + bb2: { + _1 = const (); // scope 0 at $DIR/loop_test.rs:+6:6: +6:6 + StorageDead(_2); // scope 0 at $DIR/loop_test.rs:+6:5: +6:6 + StorageDead(_1); // scope 0 at $DIR/loop_test.rs:+6:5: +6:6 + StorageLive(_4); // scope 0 at $DIR/loop_test.rs:+7:5: +10:6 + goto -> bb3; // scope 0 at $DIR/loop_test.rs:+7:5: +10:6 + } + + bb3: { + falseUnwind -> [real: bb4, cleanup: bb5]; // scope 0 at $DIR/loop_test.rs:+7:5: +10:6 + } + + bb4: { + StorageLive(_6); // scope 0 at $DIR/loop_test.rs:+8:13: +8:14 + _6 = const 1_i32; // scope 0 at $DIR/loop_test.rs:+8:17: +8:18 + FakeRead(ForLet(None), _6); // scope 0 at $DIR/loop_test.rs:+8:13: +8:14 + StorageDead(_6); // scope 0 at $DIR/loop_test.rs:+10:5: +10:6 + goto -> bb3; // scope 0 at no-location + } + + bb5 (cleanup): { + resume; // scope 0 at $DIR/loop_test.rs:+0:1: +11:2 + } +} |