summaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/2006-10-26-VectorReassoc.ll4
-rw-r--r--test/Transforms/InstCombine/2006-12-01-BadFPVectorXform.ll4
-rw-r--r--test/Transforms/InstCombine/2008-07-16-fsub.ll2
-rw-r--r--test/Transforms/InstCombine/add-sitofp.ll2
-rw-r--r--test/Transforms/InstCombine/dce-iterate.ll2
-rw-r--r--test/Transforms/InstCombine/fpextend.ll4
-rw-r--r--test/Transforms/InstCombine/mul.ll12
-rw-r--r--test/Transforms/InstCombine/multi-use-or.ll2
-rw-r--r--test/Transforms/InstCombine/shufflemask-undef.ll10
-rw-r--r--test/Transforms/InstCombine/signed-comparison.ll2
-rw-r--r--test/Transforms/InstCombine/sitofp.ll2
-rw-r--r--test/Transforms/InstCombine/vec_demanded_elts.ll6
-rw-r--r--test/Transforms/InstCombine/vec_narrow.ll2
-rw-r--r--test/Transforms/InstCombine/zero-point-zero-add.ll6
14 files changed, 26 insertions, 34 deletions
diff --git a/test/Transforms/InstCombine/2006-10-26-VectorReassoc.ll b/test/Transforms/InstCombine/2006-10-26-VectorReassoc.ll
index 5ad0af4..c7cf0dd 100644
--- a/test/Transforms/InstCombine/2006-10-26-VectorReassoc.ll
+++ b/test/Transforms/InstCombine/2006-10-26-VectorReassoc.ll
@@ -2,8 +2,8 @@
; RUN: grep mul | count 2
define <4 x float> @test(<4 x float> %V) {
- %Y = mul <4 x float> %V, < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
- %Z = mul <4 x float> %Y, < float 1.000000e+00, float 2.000000e+05, float -3.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
+ %Y = fmul <4 x float> %V, < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
+ %Z = fmul <4 x float> %Y, < float 1.000000e+00, float 2.000000e+05, float -3.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
ret <4 x float> %Z
}
diff --git a/test/Transforms/InstCombine/2006-12-01-BadFPVectorXform.ll b/test/Transforms/InstCombine/2006-12-01-BadFPVectorXform.ll
index 60ee503..eaf10a3 100644
--- a/test/Transforms/InstCombine/2006-12-01-BadFPVectorXform.ll
+++ b/test/Transforms/InstCombine/2006-12-01-BadFPVectorXform.ll
@@ -3,7 +3,7 @@
define <4 x float> @test(<4 x float> %tmp26, <4 x float> %tmp53) {
; (X+Y)-Y != X for fp vectors.
- %tmp64 = add <4 x float> %tmp26, %tmp53 ; <<4 x float>> [#uses=1]
- %tmp75 = sub <4 x float> %tmp64, %tmp53 ; <<4 x float>> [#uses=1]
+ %tmp64 = fadd <4 x float> %tmp26, %tmp53 ; <<4 x float>> [#uses=1]
+ %tmp75 = fsub <4 x float> %tmp64, %tmp53 ; <<4 x float>> [#uses=1]
ret <4 x float> %tmp75
}
diff --git a/test/Transforms/InstCombine/2008-07-16-fsub.ll b/test/Transforms/InstCombine/2008-07-16-fsub.ll
index 1d0554d..ca4174d 100644
--- a/test/Transforms/InstCombine/2008-07-16-fsub.ll
+++ b/test/Transforms/InstCombine/2008-07-16-fsub.ll
@@ -3,6 +3,6 @@
define double @test(double %X) nounwind {
; fsub of self can't be optimized away.
- %Y = sub double %X, %X
+ %Y = fsub double %X, %X
ret double %Y
}
diff --git a/test/Transforms/InstCombine/add-sitofp.ll b/test/Transforms/InstCombine/add-sitofp.ll
index 35c6567..298b9a1 100644
--- a/test/Transforms/InstCombine/add-sitofp.ll
+++ b/test/Transforms/InstCombine/add-sitofp.ll
@@ -4,6 +4,6 @@ define double @x(i32 %a, i32 %b) nounwind {
%m = lshr i32 %a, 24
%n = and i32 %m, %b
%o = sitofp i32 %n to double
- %p = add double %o, 1.0
+ %p = fadd double %o, 1.0
ret double %p
}
diff --git a/test/Transforms/InstCombine/dce-iterate.ll b/test/Transforms/InstCombine/dce-iterate.ll
index e222970..faefa8a 100644
--- a/test/Transforms/InstCombine/dce-iterate.ll
+++ b/test/Transforms/InstCombine/dce-iterate.ll
@@ -18,7 +18,7 @@ entry:
%c = lshr i960 %sz101112.ins, 320 ; <i960> [#uses=1]
%d = trunc i960 %c to i64 ; <i64> [#uses=1]
%e = bitcast i64 %d to double ; <double> [#uses=1]
- %f = add double %b, %e
+ %f = fadd double %b, %e
ret double %e
}
diff --git a/test/Transforms/InstCombine/fpextend.ll b/test/Transforms/InstCombine/fpextend.ll
index 5971080..c212128 100644
--- a/test/Transforms/InstCombine/fpextend.ll
+++ b/test/Transforms/InstCombine/fpextend.ll
@@ -6,7 +6,7 @@ define void @test() nounwind {
entry:
%tmp = load float* @X, align 4 ; <float> [#uses=1]
%tmp1 = fpext float %tmp to double ; <double> [#uses=1]
- %tmp3 = add double %tmp1, 0.000000e+00 ; <double> [#uses=1]
+ %tmp3 = fadd double %tmp1, 0.000000e+00 ; <double> [#uses=1]
%tmp34 = fptrunc double %tmp3 to float ; <float> [#uses=1]
store float %tmp34, float* @X, align 4
ret void
@@ -28,7 +28,7 @@ define void @test4() nounwind {
entry:
%tmp = load float* @X, align 4 ; <float> [#uses=1]
%tmp1 = fpext float %tmp to double ; <double> [#uses=1]
- %tmp2 = sub double -0.000000e+00, %tmp1 ; <double> [#uses=1]
+ %tmp2 = fsub double -0.000000e+00, %tmp1 ; <double> [#uses=1]
%tmp34 = fptrunc double %tmp2 to float ; <float> [#uses=1]
store float %tmp34, float* @X, align 4
ret void
diff --git a/test/Transforms/InstCombine/mul.ll b/test/Transforms/InstCombine/mul.ll
index 1a74025..9b5f7a5 100644
--- a/test/Transforms/InstCombine/mul.ll
+++ b/test/Transforms/InstCombine/mul.ll
@@ -20,7 +20,7 @@ define i32 @test3(i32 %A) {
define double @test4(double %A) {
; This is safe for FP
- %B = mul double 1.000000e+00, %A ; <double> [#uses=1]
+ %B = fmul double 1.000000e+00, %A ; <double> [#uses=1]
ret double %B
}
@@ -79,15 +79,7 @@ define i32 @test12(i8 %a, i32 %b) {
; 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 >
+ fmul <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
-}
-
diff --git a/test/Transforms/InstCombine/multi-use-or.ll b/test/Transforms/InstCombine/multi-use-or.ll
index 85a8b34..4804967 100644
--- a/test/Transforms/InstCombine/multi-use-or.ll
+++ b/test/Transforms/InstCombine/multi-use-or.ll
@@ -17,7 +17,7 @@ entry:
%c = lshr i192 %sy222324.ins, 128 ; <i192> [#uses=1]
%d = trunc i192 %c to i64 ; <i64> [#uses=1]
%e = bitcast i64 %d to double ; <double> [#uses=1]
- %f = add double %b, %e
+ %f = fadd double %b, %e
; ret double %e
ret double %f
diff --git a/test/Transforms/InstCombine/shufflemask-undef.ll b/test/Transforms/InstCombine/shufflemask-undef.ll
index 2438417..a9e8d34 100644
--- a/test/Transforms/InstCombine/shufflemask-undef.ll
+++ b/test/Transforms/InstCombine/shufflemask-undef.ll
@@ -75,16 +75,16 @@ bb266.i:
shufflevector <4 x float> %2, <4 x float> undef, <4 x i32> < i32 0, i32 4, i32 1, i32 5 > ; <<4 x float>>:3 [#uses=1]
shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> < i32 0, i32 4, i32 1, i32 5 > ; <<4 x float>>:4 [#uses=1]
shufflevector <4 x float> %4, <4 x float> %3, <4 x i32> < i32 6, i32 7, i32 2, i32 3 > ; <<4 x float>>:5 [#uses=1]
- mul <4 x float> %5, zeroinitializer ; <<4 x float>>:6 [#uses=2]
- mul <4 x float> %6, %6 ; <<4 x float>>:7 [#uses=1]
- add <4 x float> zeroinitializer, %7 ; <<4 x float>>:8 [#uses=1]
+ fmul <4 x float> %5, zeroinitializer ; <<4 x float>>:6 [#uses=2]
+ fmul <4 x float> %6, %6 ; <<4 x float>>:7 [#uses=1]
+ fadd <4 x float> zeroinitializer, %7 ; <<4 x float>>:8 [#uses=1]
call <4 x float> @llvm.x86.sse.max.ps( <4 x float> zeroinitializer, <4 x float> %8 ) nounwind readnone ; <<4 x float>>:9 [#uses=1]
%phitmp40 = bitcast <4 x float> %9 to <4 x i32> ; <<4 x i32>> [#uses=1]
%tmp4109.i = and <4 x i32> %phitmp40, < i32 8388607, i32 8388607, i32 8388607, i32 8388607 > ; <<4 x i32>> [#uses=1]
%tmp4116.i = or <4 x i32> %tmp4109.i, < i32 1065353216, i32 1065353216, i32 1065353216, i32 1065353216 > ; <<4 x i32>> [#uses=1]
%tmp4117.i = bitcast <4 x i32> %tmp4116.i to <4 x float> ; <<4 x float>> [#uses=1]
- add <4 x float> %tmp4117.i, zeroinitializer ; <<4 x float>>:10 [#uses=1]
- mul <4 x float> %10, < float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01 > ; <<4 x float>>:11 [#uses=1]
+ fadd <4 x float> %tmp4117.i, zeroinitializer ; <<4 x float>>:10 [#uses=1]
+ fmul <4 x float> %10, < float 5.000000e-01, float 5.000000e-01, float 5.000000e-01, float 5.000000e-01 > ; <<4 x float>>:11 [#uses=1]
call <4 x float> @llvm.x86.sse.max.ps( <4 x float> %11, <4 x float> zeroinitializer ) nounwind readnone ; <<4 x float>>:12 [#uses=1]
call <4 x float> @llvm.x86.sse.min.ps( <4 x float> %12, <4 x float> zeroinitializer ) nounwind readnone ; <<4 x float>>:13 [#uses=1]
%tmp4170.i = call <4 x float> @llvm.x86.sse.cmp.ps( <4 x float> %13, <4 x float> zeroinitializer, i8 2 ) nounwind ; <<4 x float>> [#uses=1]
diff --git a/test/Transforms/InstCombine/signed-comparison.ll b/test/Transforms/InstCombine/signed-comparison.ll
index fdf150f..86e07ec7 100644
--- a/test/Transforms/InstCombine/signed-comparison.ll
+++ b/test/Transforms/InstCombine/signed-comparison.ll
@@ -14,7 +14,7 @@ bb:
%t0 = and i64 %indvar, 65535
%t1 = getelementptr double* %p, i64 %t0
%t2 = load double* %t1, align 8
- %t3 = mul double %t2, 2.2
+ %t3 = fmul double %t2, 2.2
store double %t3, double* %t1, align 8
%i.04 = trunc i64 %indvar to i16
%t4 = add i16 %i.04, 1
diff --git a/test/Transforms/InstCombine/sitofp.ll b/test/Transforms/InstCombine/sitofp.ll
index c26c351..2bf7385 100644
--- a/test/Transforms/InstCombine/sitofp.ll
+++ b/test/Transforms/InstCombine/sitofp.ll
@@ -36,7 +36,7 @@ define i32 @test6(i32 %A) {
%C = and i32 %A, 32 ; <i32> [#uses=1]
%D = sitofp i32 %B to double ; <double> [#uses=1]
%E = sitofp i32 %C to double ; <double> [#uses=1]
- %F = add double %D, %E ; <double> [#uses=1]
+ %F = fadd double %D, %E ; <double> [#uses=1]
%G = fptosi double %F to i32 ; <i32> [#uses=1]
ret i32 %G
}
diff --git a/test/Transforms/InstCombine/vec_demanded_elts.ll b/test/Transforms/InstCombine/vec_demanded_elts.ll
index 03e070f..95df8c6 100644
--- a/test/Transforms/InstCombine/vec_demanded_elts.ll
+++ b/test/Transforms/InstCombine/vec_demanded_elts.ll
@@ -1,7 +1,7 @@
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
-; RUN: grep {sub float}
+; RUN: grep {fadd float}
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
-; RUN: grep {mul float}
+; RUN: grep {fmul float}
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
; RUN: not grep {insertelement.*0.00}
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
@@ -26,7 +26,7 @@ entry:
}
define i32 @test2(float %f) {
- %tmp5 = mul float %f, %f
+ %tmp5 = fmul float %f, %f
%tmp9 = insertelement <4 x float> undef, float %tmp5, i32 0
%tmp10 = insertelement <4 x float> %tmp9, float 0.000000e+00, i32 1
%tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, i32 2
diff --git a/test/Transforms/InstCombine/vec_narrow.ll b/test/Transforms/InstCombine/vec_narrow.ll
index 9063148..e444c2a 100644
--- a/test/Transforms/InstCombine/vec_narrow.ll
+++ b/test/Transforms/InstCombine/vec_narrow.ll
@@ -5,7 +5,7 @@
define float @test(%V %A, %V %B, float %f) {
%C = insertelement %V %A, float %f, i32 0 ; <%V> [#uses=1]
- %D = add %V %C, %B ; <%V> [#uses=1]
+ %D = fadd %V %C, %B ; <%V> [#uses=1]
%E = extractelement %V %D, i32 0 ; <float> [#uses=1]
ret float %E
}
diff --git a/test/Transforms/InstCombine/zero-point-zero-add.ll b/test/Transforms/InstCombine/zero-point-zero-add.ll
index bae60d9..adb28e4 100644
--- a/test/Transforms/InstCombine/zero-point-zero-add.ll
+++ b/test/Transforms/InstCombine/zero-point-zero-add.ll
@@ -3,13 +3,13 @@
declare double @abs(double)
define double @test(double %X) {
- %Y = add double %X, 0.0 ;; Should be a single add x, 0.0
- %Z = add double %Y, 0.0
+ %Y = fadd double %X, 0.0 ;; Should be a single add x, 0.0
+ %Z = fadd double %Y, 0.0
ret double %Z
}
define double @test1(double %X) {
%Y = call double @abs(double %X)
- %Z = add double %Y, 0.0
+ %Z = fadd double %Y, 0.0
ret double %Z
}
OpenPOWER on IntegriCloud