summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir')
-rw-r--r--tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir87
1 files changed, 87 insertions, 0 deletions
diff --git a/tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir b/tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir
new file mode 100644
index 000000000..b84c17c21
--- /dev/null
+++ b/tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir
@@ -0,0 +1,87 @@
+// MIR for `test_or` after built
+
+fn test_or() -> () {
+ let mut _0: ();
+ let mut _1: bool;
+ let mut _2: u8;
+ let mut _3: Droppy;
+ let mut _4: bool;
+ let mut _5: u8;
+ let mut _6: Droppy;
+
+ bb0: {
+ StorageLive(_1);
+ StorageLive(_2);
+ StorageLive(_3);
+ _3 = Droppy(const 0_u8);
+ _2 = (_3.0: u8);
+ _1 = Gt(move _2, const 0_u8);
+ switchInt(move _1) -> [0: bb2, otherwise: bb1];
+ }
+
+ bb1: {
+ drop(_3) -> [return: bb3, unwind: bb12];
+ }
+
+ bb2: {
+ goto -> bb4;
+ }
+
+ bb3: {
+ StorageDead(_3);
+ StorageDead(_2);
+ goto -> bb8;
+ }
+
+ bb4: {
+ drop(_3) -> [return: bb5, unwind: bb12];
+ }
+
+ bb5: {
+ StorageDead(_3);
+ StorageDead(_2);
+ StorageLive(_4);
+ StorageLive(_5);
+ StorageLive(_6);
+ _6 = Droppy(const 1_u8);
+ _5 = (_6.0: u8);
+ _4 = Gt(move _5, const 1_u8);
+ switchInt(move _4) -> [0: bb7, otherwise: bb6];
+ }
+
+ bb6: {
+ drop(_6) -> [return: bb8, unwind: bb12];
+ }
+
+ bb7: {
+ goto -> bb9;
+ }
+
+ bb8: {
+ StorageDead(_6);
+ StorageDead(_5);
+ _0 = const ();
+ goto -> bb11;
+ }
+
+ bb9: {
+ drop(_6) -> [return: bb10, unwind: bb12];
+ }
+
+ bb10: {
+ StorageDead(_6);
+ StorageDead(_5);
+ _0 = const ();
+ goto -> bb11;
+ }
+
+ bb11: {
+ StorageDead(_4);
+ StorageDead(_1);
+ return;
+ }
+
+ bb12 (cleanup): {
+ resume;
+ }
+}