blob: b590be5370f1d41050f9fa2d0e0689832aaf094d [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; // in scope 0 at $DIR/if-condition-int.rs:43:27: 43:28
let mut _0: i32; // return place in scope 0 at $DIR/if-condition-int.rs:43:37: 43:40
let _2: bool; // in scope 0 at $DIR/if-condition-int.rs:44:9: 44:10
let mut _3: i8; // in scope 0 at $DIR/if-condition-int.rs:44:13: 44:14
let mut _4: i32; // in scope 0 at $DIR/if-condition-int.rs:46:23: 46:31
let mut _5: bool; // in scope 0 at $DIR/if-condition-int.rs:46:23: 46:24
let mut _6: i32; // in scope 0 at $DIR/if-condition-int.rs:47:23: 47:31
let mut _7: bool; // in scope 0 at $DIR/if-condition-int.rs:47:23: 47:24
scope 1 {
debug b => _2; // in scope 1 at $DIR/if-condition-int.rs:44:9: 44:10
}
bb0: {
StorageLive(_2); // scope 0 at $DIR/if-condition-int.rs:44:9: 44:10
StorageLive(_3); // scope 0 at $DIR/if-condition-int.rs:44:13: 44:14
_3 = _1; // scope 0 at $DIR/if-condition-int.rs:44:13: 44:14
- _2 = Eq(move _3, const 17_i8); // scope 0 at $DIR/if-condition-int.rs:44:13: 44:20
- StorageDead(_3); // scope 0 at $DIR/if-condition-int.rs:44:19: 44:20
- switchInt(_2) -> [false: bb2, otherwise: bb1]; // scope 1 at $DIR/if-condition-int.rs:46:9: 46:14
+ _2 = Eq(_3, const 17_i8); // scope 0 at $DIR/if-condition-int.rs:44:13: 44:20
+ nop; // scope 0 at $DIR/if-condition-int.rs:44:19: 44:20
+ switchInt(move _3) -> [17_i8: bb1, otherwise: bb2]; // scope 1 at $DIR/if-condition-int.rs:46:9: 46:14
}
bb1: {
+ StorageDead(_3); // scope 1 at $DIR/if-condition-int.rs:46:9: 46:14
StorageLive(_6); // scope 1 at $DIR/if-condition-int.rs:47:23: 47:31
StorageLive(_7); // scope 1 at $DIR/if-condition-int.rs:47:23: 47:24
_7 = _2; // scope 1 at $DIR/if-condition-int.rs:47:23: 47:24
_6 = move _7 as i32 (Misc); // scope 1 at $DIR/if-condition-int.rs:47:23: 47:31
StorageDead(_7); // scope 1 at $DIR/if-condition-int.rs:47:30: 47:31
_0 = Add(const 100_i32, move _6); // scope 1 at $DIR/if-condition-int.rs:47:17: 47:31
StorageDead(_6); // scope 1 at $DIR/if-condition-int.rs:47:30: 47:31
goto -> bb3; // scope 1 at $DIR/if-condition-int.rs:45:5: 48:6
}
bb2: {
+ StorageDead(_3); // scope 1 at $DIR/if-condition-int.rs:46:9: 46:14
StorageLive(_4); // scope 1 at $DIR/if-condition-int.rs:46:23: 46:31
StorageLive(_5); // scope 1 at $DIR/if-condition-int.rs:46:23: 46:24
_5 = _2; // scope 1 at $DIR/if-condition-int.rs:46:23: 46:24
_4 = move _5 as i32 (Misc); // scope 1 at $DIR/if-condition-int.rs:46:23: 46:31
StorageDead(_5); // scope 1 at $DIR/if-condition-int.rs:46:30: 46:31
_0 = Add(const 10_i32, move _4); // scope 1 at $DIR/if-condition-int.rs:46:18: 46:31
StorageDead(_4); // scope 1 at $DIR/if-condition-int.rs:46:30: 46:31
goto -> bb3; // scope 1 at $DIR/if-condition-int.rs:45:5: 48:6
}
bb3: {
StorageDead(_2); // scope 0 at $DIR/if-condition-int.rs:49:1: 49:2
return; // scope 0 at $DIR/if-condition-int.rs:49:2: 49:2
}
}