diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-07-08 05:46:34 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-07-08 05:46:34 +0000 |
| commit | d137a08b0dfbc73eab3d40af532cad08733d08af (patch) | |
| tree | 4e6dd62650c02ee354e20484ed3acdd0609de1b3 /llvm/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll | |
| parent | 0a1707c6ba820b1ff85acdecb9ba9f6509e7c9e3 (diff) | |
| download | bcm5719-llvm-d137a08b0dfbc73eab3d40af532cad08733d08af.tar.gz bcm5719-llvm-d137a08b0dfbc73eab3d40af532cad08733d08af.zip | |
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)
llvm-svn: 53220
Diffstat (limited to 'llvm/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll')
| -rw-r--r-- | llvm/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll b/llvm/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll new file mode 100644 index 00000000000..d50ed90b6f3 --- /dev/null +++ b/llvm/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 +} |

