From 2aa0ff27aaab552442a09d5b5f8ac7085e01d532 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 11 Aug 2008 22:06:05 +0000 Subject: 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. llvm-svn: 54653 --- llvm/test/Transforms/InstCombine/mul.ll | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'llvm/test/Transforms/InstCombine/mul.ll') diff --git a/llvm/test/Transforms/InstCombine/mul.ll b/llvm/test/Transforms/InstCombine/mul.ll index 8e9ab8d4213..1a740254341 100644 --- a/llvm/test/Transforms/InstCombine/mul.ll +++ b/llvm/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 ; [#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 +} + -- cgit v1.2.3