OSDN Git Service

[PowerPC] fix tests to be independent of FP undef
authorSanjay Patel <spatel@rotateright.com>
Sat, 10 Mar 2018 16:14:05 +0000 (16:14 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 10 Mar 2018 16:14:05 +0000 (16:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327210 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/PowerPC/pr30715.ll
test/CodeGen/PowerPC/qpx-bv-sint.ll

index 8ab4f54..5d6ba2c 100644 (file)
@@ -38,7 +38,7 @@ vector.body:                                      ; preds = %vector.body.prehead
   %5 = bitcast float* %4 to <4 x float>*
   %wide.load = load <4 x float>, <4 x float>* %5, align 4
   %6 = fpext <4 x float> %wide.load to <4 x ppc_fp128>
-  %7 = fadd <4 x ppc_fp128> %6, undef
+  %7 = fadd <4 x ppc_fp128> %6, %6
   %8 = fptrunc <4 x ppc_fp128> %7 to <4 x float>
   %9 = bitcast float* %4 to <4 x float>*
   store <4 x float> %8, <4 x float>* %9, align 4
@@ -61,7 +61,7 @@ for.body:                                         ; preds = %for.body.preheader,
   %arrayidx.i = getelementptr inbounds float, float* %2, i64 %indvars.iv
   %11 = load float, float* %arrayidx.i, align 4
   %conv = fpext float %11 to ppc_fp128
-  %add = fadd ppc_fp128 %conv, undef
+  %add = fadd ppc_fp128 %conv, %conv
   %conv4 = fptrunc ppc_fp128 %add to float
   store float %conv4, float* %arrayidx.i, align 4
   %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
index 36555b0..4e0aef4 100644 (file)
@@ -10,9 +10,9 @@ for.body4:                                        ; preds = %for.body4, %entry
   %conv.4 = sitofp i32 %inp1 to double
   %conv.5 = sitofp i32 %inp1 to double
   %mul.4.v.i0.1 = insertelement <2 x double> undef, double %conv.4, i32 0
-  %mul.4.v.i0.2 = insertelement <2 x double> %mul.4.v.i0.1, double %conv.5, i32 1
-  %mul.4 = fmul <2 x double> %mul.4.v.i0.2, undef
-  %add7.4 = fadd <2 x double> undef, %mul.4
+  %v = insertelement <2 x double> %mul.4.v.i0.1, double %conv.5, i32 1
+  %vv = fmul <2 x double> %v, %v
+  %add7.4 = fadd <2 x double> %vv, %vv
   store <2 x double> %add7.4, <2 x double>* undef, align 16
   br i1 undef, label %for.end, label %for.body4