diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-12-31 01:53:51 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2024-01-18 22:53:07 +0000 |
| commit | be9668d3989b721bfaa2ec517b307965476431fa (patch) | |
| tree | 0937caa224afeb543c2cfb529e7f1d6110896f59 /tests/mir-opt/jump_threading.aggregate.JumpThreading.panic-unwind.diff | |
| parent | 25f8d01fd8bda339612d0c0a8844173a09205f7c (diff) | |
| download | rust-be9668d3989b721bfaa2ec517b307965476431fa.tar.gz rust-be9668d3989b721bfaa2ec517b307965476431fa.zip | |
Use an interpreter in jump threading.
Diffstat (limited to 'tests/mir-opt/jump_threading.aggregate.JumpThreading.panic-unwind.diff')
| -rw-r--r-- | tests/mir-opt/jump_threading.aggregate.JumpThreading.panic-unwind.diff | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/mir-opt/jump_threading.aggregate.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.aggregate.JumpThreading.panic-unwind.diff new file mode 100644 index 00000000000..66aa892c6f3 --- /dev/null +++ b/tests/mir-opt/jump_threading.aggregate.JumpThreading.panic-unwind.diff @@ -0,0 +1,52 @@ +- // MIR for `aggregate` before JumpThreading ++ // MIR for `aggregate` after JumpThreading + + fn aggregate(_1: u8) -> u8 { + debug x => _1; + let mut _0: u8; + let _2: u8; + let _3: u8; + let mut _4: (u8, u8); + let mut _5: bool; + let mut _6: u8; + scope 1 { + debug a => _2; + debug b => _3; + } + + bb0: { + StorageLive(_4); + _4 = const _; + StorageLive(_2); + _2 = (_4.0: u8); + StorageLive(_3); + _3 = (_4.1: u8); + StorageDead(_4); + StorageLive(_5); + StorageLive(_6); + _6 = _2; + _5 = Eq(move _6, const 7_u8); +- switchInt(move _5) -> [0: bb2, otherwise: bb1]; ++ goto -> bb2; + } + + bb1: { + StorageDead(_6); + _0 = _3; + goto -> bb3; + } + + bb2: { + StorageDead(_6); + _0 = _2; + goto -> bb3; + } + + bb3: { + StorageDead(_5); + StorageDead(_3); + StorageDead(_2); + return; + } + } + |
