diff options
Diffstat (limited to 'llvm/test/Transforms/SLPVectorizer')
-rw-r--r-- | llvm/test/Transforms/SLPVectorizer/X86/call.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/call.ll b/llvm/test/Transforms/SLPVectorizer/X86/call.ll index a55cc1bf793..79f01106dc9 100644 --- a/llvm/test/Transforms/SLPVectorizer/X86/call.ll +++ b/llvm/test/Transforms/SLPVectorizer/X86/call.ll @@ -7,6 +7,7 @@ declare double @sin(double) declare double @cos(double) declare double @pow(double, double) declare double @exp2(double) +declare double @sqrt(double) declare i64 @round(i64) @@ -96,6 +97,28 @@ entry: } +; CHECK: sqrt_libm +; CHECK: call <2 x double> @llvm.sqrt.v2f64 +; CHECK: ret void +define void @sqrt_libm(double* %a, double* %b, double* %c) { +entry: + %i0 = load double, double* %a, align 8 + %i1 = load double, double* %b, align 8 + %mul = fmul double %i0, %i1 + %call = tail call double @sqrt(double %mul) nounwind readnone + %arrayidx3 = getelementptr inbounds double, double* %a, i64 1 + %i3 = load double, double* %arrayidx3, align 8 + %arrayidx4 = getelementptr inbounds double, double* %b, i64 1 + %i4 = load double, double* %arrayidx4, align 8 + %mul5 = fmul double %i3, %i4 + %call5 = tail call double @sqrt(double %mul5) nounwind readnone + store double %call, double* %c, align 8 + %arrayidx5 = getelementptr inbounds double, double* %c, i64 1 + store double %call5, double* %arrayidx5, align 8 + ret void +} + + ; Negative test case ; CHECK: round_custom ; CHECK-NOT: load <4 x i64> |