summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-11 22:06:05 +0000
committerChris Lattner <sabre@nondot.org>2008-08-11 22:06:05 +0000
commitb8cd4d3d4902234f98760fec61f5947a8b7055a4 (patch)
treee94e684876c2080308f543c2dc730c3ea5313cf2 /test/Transforms/InstCombine
parent3b8a90686adb3d0adaa4389e7b7900570a235e03 (diff)
downloadllvm-b8cd4d3d4902234f98760fec61f5947a8b7055a4.tar.gz
llvm-b8cd4d3d4902234f98760fec61f5947a8b7055a4.tar.bz2
llvm-b8cd4d3d4902234f98760fec61f5947a8b7055a4.tar.xz
Implement support for simplifying vector comparisons by 0.0 and 1.0 like we
do for scalars. Patch contributed by Nicolas Capens This also generalizes the previous xforms to work on long double, now that isExactlyValue works for long double. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/mul.ll17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/Transforms/InstCombine/mul.ll b/test/Transforms/InstCombine/mul.ll
index 8e9ab8d421..1a74025434 100644
--- a/test/Transforms/InstCombine/mul.ll
+++ b/test/Transforms/InstCombine/mul.ll
@@ -1,7 +1,5 @@
; This test makes sure that mul instructions are properly eliminated.
-;
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep mul
-; END.
define i32 @test1(i32 %A) {
%B = mul i32 %A, 1 ; <i32> [#uses=1]
@@ -78,3 +76,18 @@ define i32 @test12(i8 %a, i32 %b) {
ret i32 %e
}
+; PR2642
+define internal void @test13(<4 x float>*) {
+ load <4 x float>* %0, align 1
+ mul <4 x float> %2, < float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00 >
+ store <4 x float> %3, <4 x float>* %0, align 1
+ ret void
+}
+
+define internal void @test14(<4 x float>*) {
+ load <4 x float>* %0, align 1
+ mul <4 x float> %2, zeroinitializer
+ store <4 x float> %3, <4 x float>* %0, align 1
+ ret void
+}
+