blob: f5f2e0317ead10c9f3e17c62866fffafe966ff04 [file] [log] [blame]
- // MIR for `dont_remove_comparison` before SimplifyComparisonIntegral
+ // MIR for `dont_remove_comparison` after SimplifyComparisonIntegral
fn dont_remove_comparison(_1: i8) -> i32 {
debug a => _1;
let mut _0: i32;
let _2: bool;
let mut _3: i8;
let mut _4: i32;
let mut _5: bool;
let mut _6: i32;
let mut _7: bool;
scope 1 {
debug b => _2;
}
bb0: {
nop;
StorageLive(_3);
_3 = copy _1;
_2 = Eq(copy _1, const 17_i8);
StorageDead(_3);
- switchInt(copy _2) -> [0: bb2, otherwise: bb1];
+ switchInt(copy _1) -> [17: bb1, otherwise: bb2];
}
bb1: {
StorageLive(_6);
StorageLive(_7);
_7 = copy _2;
_6 = copy _2 as i32 (IntToInt);
StorageDead(_7);
_0 = Add(const 100_i32, move _6);
StorageDead(_6);
goto -> bb3;
}
bb2: {
StorageLive(_4);
StorageLive(_5);
_5 = copy _2;
_4 = copy _2 as i32 (IntToInt);
StorageDead(_5);
_0 = Add(const 10_i32, move _4);
StorageDead(_4);
goto -> bb3;
}
bb3: {
nop;
return;
}
}