Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | not grep zext
      2 
      3 define i32 @a(i1 %x) {
      4 entry:
      5         %y = zext i1 %x to i32
      6         %res = add i32 %y, 1
      7         ret i32 %res
      8 }
      9 
     10 define i32 @b(i1 %x) {
     11 entry:
     12         %y = zext i1 %x to i32
     13         %res = add i32 %y, -1
     14         ret i32 %res
     15 }
     16 
     17 define i32 @c(i1 %x) {
     18 entry:
     19         %y = zext i1 %x to i32
     20         %res = sub i32 0, %y
     21         ret i32 %res
     22 }
     23 
     24 define i32 @d(i1 %x) {
     25 entry:
     26         %y = zext i1 %x to i32
     27         %res = sub i32 3, %y
     28         ret i32 %res
     29 }
     30