This implements the second half of the fix for PR3290, handling
[oota-llvm.git] / test / Transforms / InstCombine / mul.ll
index 8e9ab8d4213ec1de11575c099e21d444cbf93944..1a7402543418b69f00204ac66ff128fb4b707716 100644 (file)
@@ -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
+}
+