Revert constant-folding change that will miscompile in some cases.
[oota-llvm.git] / test / Transforms / InstCombine / 2008-01-21-MismatchedCastAndCompare.ll
1 ; RUN: llvm-as < %s | opt -instcombine | notcast
2 ; RUN: llvm-as < %s | opt -instcombine | not grep {icmp s}
3 ; PR1940
4
5 define i1 @test1(i8 %A, i8 %B) {
6         %a = zext i8 %A to i32
7         %b = zext i8 %B to i32
8         %c = icmp sgt i32 %a, %b
9         ret i1 %c
10 }
11
12 define i1 @test2(i8 %A, i8 %B) {
13         %a = sext i8 %A to i32
14         %b = sext i8 %B to i32
15         %c = icmp ugt i32 %a, %b
16         ret i1 %c
17 }