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/const_goto.issue_77355_opt.ConstGoto.diff | |
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/const_goto.issue_77355_opt.ConstGoto.diff')
-rw-r--r-- | src/test/mir-opt/const_goto.issue_77355_opt.ConstGoto.diff | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/test/mir-opt/const_goto.issue_77355_opt.ConstGoto.diff b/src/test/mir-opt/const_goto.issue_77355_opt.ConstGoto.diff new file mode 100644 index 000000000..fade2d0bc --- /dev/null +++ b/src/test/mir-opt/const_goto.issue_77355_opt.ConstGoto.diff @@ -0,0 +1,52 @@ +- // MIR for `issue_77355_opt` before ConstGoto ++ // MIR for `issue_77355_opt` after ConstGoto + + fn issue_77355_opt(_1: Foo) -> u64 { + debug num => _1; // in scope 0 at $DIR/const_goto.rs:+0:20: +0:23 + let mut _0: u64; // return place in scope 0 at $DIR/const_goto.rs:+0:33: +0:36 +- let mut _2: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL +- let mut _3: isize; // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28 ++ let mut _2: isize; // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28 + + bb0: { +- StorageLive(_2); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL +- _3 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:+1:17: +1:20 +- switchInt(move _3) -> [1_isize: bb2, 2_isize: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL ++ _2 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:+1:17: +1:20 ++ switchInt(move _2) -> [1_isize: bb2, 2_isize: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL + } + + bb1: { +- _2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL +- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL ++ _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:+1:53: +1:55 ++ goto -> bb3; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57 + } + + bb2: { +- _2 = const true; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL +- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL +- } +- +- bb3: { +- switchInt(move _2) -> [false: bb5, otherwise: bb4]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL +- } +- +- bb4: { + _0 = const 23_u64; // scope 0 at $DIR/const_goto.rs:+1:41: +1:43 +- goto -> bb6; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57 ++ goto -> bb3; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57 + } + +- bb5: { +- _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:+1:53: +1:55 +- goto -> bb6; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57 +- } +- +- bb6: { +- StorageDead(_2); // scope 0 at $DIR/const_goto.rs:+1:56: +1:57 ++ bb3: { + return; // scope 0 at $DIR/const_goto.rs:+2:2: +2:2 + } + } + |