fix incorrect folding of icmp with undef, PR6481.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-03-03 19:46:03 +00:00
parent fec8657351
commit c8e14b3d37
3 changed files with 15 additions and 6 deletions

View File

@@ -48,7 +48,7 @@ entry:
%V = icmp eq <2 x i64> %x, undef
ret <2 x i1> %V
; CHECK: @test5
; CHECK: ret <2 x i1> undef
; CHECK: ret <2 x i1> <i1 true, i1 true>
}
define i32 @test6(i32 %a, i32 %b) {
@@ -121,3 +121,13 @@ define i1 @test12(i1 %A) {
; CHECK-NEXT: %B = select i1
; CHECK-NEXT: ret i1 %B
}
; PR6481
define i1 @test13(i8 %X) nounwind readnone {
entry:
%cmp = icmp slt i8 undef, %X
ret i1 %cmp
; CHECK: @test13
; CHECK: ret i1 false
}