From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- ...gical_or_in_conditional.test_or.built.after.mir | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir (limited to 'tests/mir-opt/building/logical_or_in_conditional.test_or.built.after.mir') 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; + } +} -- cgit v1.2.3