rust/tests/mir-opt/pre-codegen/chained_comparison.naive.PreCodegen.after.mir

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

118 lines
2.4 KiB
Rust
Raw Normal View History

2023-04-14 13:23:07 -05:00
// MIR for `naive` after PreCodegen
fn naive(_1: &Blueprint, _2: &Blueprint) -> bool {
2023-06-06 08:47:00 -05:00
debug a => _1;
debug b => _2;
let mut _0: bool;
let mut _3: u32;
let mut _4: u32;
let mut _5: bool;
2023-08-20 14:00:21 -05:00
let mut _6: u32;
2023-06-06 08:47:00 -05:00
let mut _7: u32;
2023-08-20 14:00:21 -05:00
let mut _8: bool;
let mut _9: u32;
let mut _10: u32;
let mut _11: bool;
let mut _12: u32;
2023-08-20 14:00:21 -05:00
let mut _13: u32;
let mut _14: bool;
2023-06-06 08:47:00 -05:00
let mut _15: u32;
let mut _16: u32;
2023-04-14 13:23:07 -05:00
bb0: {
2023-06-06 08:47:00 -05:00
StorageLive(_5);
StorageLive(_3);
_3 = copy ((*_1).0: u32);
StorageLive(_4);
_4 = copy ((*_2).0: u32);
_5 = Eq(move _3, move _4);
switchInt(move _5) -> [0: bb1, otherwise: bb2];
2023-04-14 13:23:07 -05:00
}
bb1: {
2023-08-20 14:00:21 -05:00
StorageDead(_4);
StorageDead(_3);
goto -> bb8;
2023-04-14 13:23:07 -05:00
}
bb2: {
2023-08-20 14:00:21 -05:00
StorageDead(_4);
StorageDead(_3);
StorageLive(_8);
2023-08-20 14:00:21 -05:00
StorageLive(_6);
_6 = copy ((*_1).1: u32);
StorageLive(_7);
_7 = copy ((*_2).1: u32);
_8 = Eq(move _6, move _7);
switchInt(move _8) -> [0: bb3, otherwise: bb4];
2023-04-14 13:23:07 -05:00
}
bb3: {
2023-08-20 14:00:21 -05:00
StorageDead(_7);
StorageDead(_6);
goto -> bb8;
2023-04-14 13:23:07 -05:00
}
bb4: {
2023-08-20 14:00:21 -05:00
StorageDead(_7);
StorageDead(_6);
StorageLive(_11);
StorageLive(_9);
_9 = copy ((*_1).2: u32);
StorageLive(_10);
_10 = copy ((*_2).2: u32);
_11 = Eq(move _9, move _10);
switchInt(move _11) -> [0: bb5, otherwise: bb6];
2023-04-14 13:23:07 -05:00
}
bb5: {
2023-08-20 14:00:21 -05:00
StorageDead(_10);
StorageDead(_9);
goto -> bb8;
2023-04-14 13:23:07 -05:00
}
bb6: {
2023-08-20 14:00:21 -05:00
StorageDead(_10);
StorageDead(_9);
StorageLive(_14);
StorageLive(_12);
_12 = copy ((*_1).3: u32);
StorageLive(_13);
_13 = copy ((*_2).3: u32);
_14 = Eq(move _12, move _13);
switchInt(move _14) -> [0: bb7, otherwise: bb9];
2023-04-14 13:23:07 -05:00
}
2023-06-01 01:08:25 -05:00
bb7: {
2023-08-20 14:00:21 -05:00
StorageDead(_13);
StorageDead(_12);
goto -> bb8;
2023-04-14 13:23:07 -05:00
}
2023-06-01 01:08:25 -05:00
bb8: {
2023-08-20 14:00:21 -05:00
_0 = const false;
goto -> bb10;
}
bb9: {
StorageDead(_13);
StorageDead(_12);
StorageLive(_15);
2023-08-20 14:00:21 -05:00
_15 = copy ((*_1).4: u32);
StorageLive(_16);
2023-08-20 14:00:21 -05:00
_16 = copy ((*_2).4: u32);
_0 = Eq(move _15, move _16);
StorageDead(_16);
StorageDead(_15);
2023-08-20 14:00:21 -05:00
goto -> bb10;
}
bb10: {
StorageDead(_14);
2023-08-20 14:00:21 -05:00
StorageDead(_11);
StorageDead(_8);
StorageDead(_5);
2023-06-06 08:47:00 -05:00
return;
2023-04-14 13:23:07 -05:00
}
}