1 // unit-test: InstCombine
3 // EMIT_MIR bool_compare.opt1.InstCombine.diff
4 fn opt1(x: bool) -> u32 {
5 if x != true { 0 } else { 1 }
8 // EMIT_MIR bool_compare.opt2.InstCombine.diff
9 fn opt2(x: bool) -> u32 {
10 if true != x { 0 } else { 1 }
13 // EMIT_MIR bool_compare.opt3.InstCombine.diff
14 fn opt3(x: bool) -> u32 {
15 if x == false { 0 } else { 1 }
18 // EMIT_MIR bool_compare.opt4.InstCombine.diff
19 fn opt4(x: bool) -> u32 {
20 if false == x { 0 } else { 1 }