Fix three bugs:

1) evaluate [v]fcmp true/false with undefs to true or false instead
   of undef.
2) fix vector comparisons with undef to return a vector result instead 
   of i1
3) fix vector comparisons with evaluatable results to return vector
   true/false instead of i1 true/false (PR2529)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53220 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2008-07-08 05:46:34 +00:00
parent 5822e9e57f
commit 155a490258
2 changed files with 115 additions and 56 deletions

View File

@@ -0,0 +1,14 @@
; RUN: llvm-as < %s | opt -constprop | llvm-dis
; PR2529
define <4 x i32> @test1(i32 %argc, i8** %argv) {
entry:
%foo = vicmp slt <4 x i32> undef, <i32 14, i32 undef, i32 undef, i32 undef>
ret <4 x i32> %foo
}
define <4 x i32> @main(i32 %argc, i8** %argv) {
entry:
%foo = vicmp slt <4 x i32> <i32 undef, i32 undef, i32 undef, i32
undef>, <i32 undef, i32 undef, i32 undef, i32 undef>
ret <4 x i32> %foo
}