1 ; RUN: llc -march=x86 < %s | FileCheck %s
3 define i32 @test1(i32 %a, i32 %b) nounwind readnone {
4 %not.cmp = icmp ne i32 %a, 0
5 %inc = zext i1 %not.cmp to i32
6 %retval.0 = add i32 %inc, %b
14 define i32 @test2(i32 %a, i32 %b) nounwind readnone {
15 %cmp = icmp eq i32 %a, 0
16 %inc = zext i1 %cmp to i32
17 %retval.0 = add i32 %inc, %b
25 define i32 @test3(i32 %a, i32 %b) nounwind readnone {
26 %cmp = icmp eq i32 %a, 0
27 %inc = zext i1 %cmp to i32
28 %retval.0 = add i32 %inc, %b
36 define i32 @test4(i32 %a, i32 %b) nounwind readnone {
37 %not.cmp = icmp ne i32 %a, 0
38 %inc = zext i1 %not.cmp to i32
39 %retval.0 = add i32 %inc, %b
47 define i32 @test5(i32 %a, i32 %b) nounwind readnone {
48 %not.cmp = icmp ne i32 %a, 0
49 %inc = zext i1 %not.cmp to i32
50 %retval.0 = sub i32 %b, %inc
58 define i32 @test6(i32 %a, i32 %b) nounwind readnone {
59 %cmp = icmp eq i32 %a, 0
60 %inc = zext i1 %cmp to i32
61 %retval.0 = sub i32 %b, %inc
69 define i32 @test7(i32 %a, i32 %b) nounwind readnone {
70 %cmp = icmp eq i32 %a, 0
71 %inc = zext i1 %cmp to i32
72 %retval.0 = sub i32 %b, %inc
80 define i32 @test8(i32 %a, i32 %b) nounwind readnone {
81 %not.cmp = icmp ne i32 %a, 0
82 %inc = zext i1 %not.cmp to i32
83 %retval.0 = sub i32 %b, %inc