summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff')
-rw-r--r--tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff54
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
new file mode 100644
index 000000000..1cc44ce06
--- /dev/null
+++ b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
@@ -0,0 +1,54 @@
+- // MIR for `test` before SimplifyComparisonIntegral
++ // MIR for `test` after SimplifyComparisonIntegral
+
+ fn test(_1: T) -> () {
+ debug x => _1;
+ let mut _0: ();
+ let _2: &[T];
+ let mut _3: &[T; 3];
+ let _4: &[T; 3];
+ let _5: [T; 3];
+ let mut _6: T;
+ let mut _7: T;
+ let mut _8: T;
+ let mut _9: usize;
+ let mut _10: usize;
+ let mut _11: bool;
+ let mut _15: !;
+ scope 1 {
+ debug v => _2;
+ let _12: &T;
+ let _13: &T;
+ let _14: &T;
+ scope 2 {
+ debug v1 => &(*_2)[0 of 3];
+ debug v2 => &(*_2)[1 of 3];
+ debug v3 => &(*_2)[2 of 3];
+ }
+ }
+
+ bb0: {
+ StorageLive(_2);
+ StorageLive(_5);
+ _5 = [_1, _1, _1];
+ _4 = &_5;
+ _2 = _4 as &[T] (PointerCoercion(Unsize));
+ _9 = Len((*_2));
+ _10 = const 3_usize;
+- _11 = Eq(move _9, const 3_usize);
+- switchInt(move _11) -> [0: bb1, otherwise: bb2];
++ nop;
++ switchInt(move _9) -> [3: bb2, otherwise: bb1];
+ }
+
+ bb1: {
+ _15 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind unreachable;
+ }
+
+ bb2: {
+ StorageDead(_5);
+ StorageDead(_2);
+ return;
+ }
+ }
+