aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ConstProp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-08 05:46:34 +0000
committerChris Lattner <sabre@nondot.org>2008-07-08 05:46:34 +0000
commit155a490258a3a58f77ead53daa2078c3898938b5 (patch)
treeea8222f9f71bf9bbd8cf93d5c4c819bda1233463 /test/Transforms/ConstProp
parent5822e9e57f38a096e5bb788de992e1e9cd1cc47d (diff)
downloadexternal_llvm-155a490258a3a58f77ead53daa2078c3898938b5.zip
external_llvm-155a490258a3a58f77ead53daa2078c3898938b5.tar.gz
external_llvm-155a490258a3a58f77ead53daa2078c3898938b5.tar.bz2
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
Diffstat (limited to 'test/Transforms/ConstProp')
-rw-r--r--test/Transforms/ConstProp/2008-07-07-VectorCompare.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll b/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll
new file mode 100644
index 0000000..d50ed90
--- /dev/null
+++ b/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll
@@ -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
+}