rust/tests/mir-opt/pre-codegen/tuple_ord.demo_le_total.PreCodegen.after.mir
2025-04-04 10:55:36 +00:00

72 lines
1.9 KiB
Rust

// MIR for `demo_le_total` after PreCodegen
fn demo_le_total(_1: &(u16, i16), _2: &(u16, i16)) -> bool {
debug a => _1;
debug b => _2;
let mut _0: bool;
scope 1 (inlined std::cmp::impls::<impl PartialOrd for &(u16, i16)>::le) {
scope 2 (inlined core::tuple::<impl PartialOrd for (u16, i16)>::le) {
let mut _7: std::ops::ControlFlow<bool>;
let _8: bool;
scope 3 {
}
scope 4 (inlined std::cmp::impls::<impl PartialOrd for u16>::__chaining_le) {
let mut _3: u16;
let mut _4: u16;
let mut _5: bool;
let mut _6: bool;
scope 5 {
}
}
scope 6 (inlined std::cmp::impls::<impl PartialOrd for i16>::le) {
let mut _9: i16;
let mut _10: i16;
}
}
}
bb0: {
StorageLive(_7);
StorageLive(_3);
StorageLive(_4);
_3 = copy ((*_1).0: u16);
_4 = copy ((*_2).0: u16);
StorageLive(_5);
_5 = Eq(copy _3, copy _4);
switchInt(move _5) -> [0: bb1, otherwise: bb2];
}
bb1: {
StorageLive(_6);
_6 = Le(copy _3, copy _4);
_7 = ControlFlow::<bool>::Break(move _6);
StorageDead(_6);
StorageDead(_5);
StorageDead(_4);
StorageDead(_3);
StorageLive(_8);
_8 = copy ((_7 as Break).0: bool);
_0 = copy _8;
StorageDead(_8);
goto -> bb3;
}
bb2: {
StorageDead(_5);
StorageDead(_4);
StorageDead(_3);
StorageLive(_9);
_9 = copy ((*_1).1: i16);
StorageLive(_10);
_10 = copy ((*_2).1: i16);
_0 = Le(move _9, move _10);
StorageDead(_10);
StorageDead(_9);
goto -> bb3;
}
bb3: {
StorageDead(_7);
return;
}
}