diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/double-float-shrink-1.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/double-float-shrink-1.ll b/test/Transforms/InstCombine/double-float-shrink-1.ll index e5448ee..5cacb59 100644 --- a/test/Transforms/InstCombine/double-float-shrink-1.ll +++ b/test/Transforms/InstCombine/double-float-shrink-1.ll @@ -263,6 +263,7 @@ define double @sin_test2(float %f) nounwind readnone { ret double %call ; CHECK: call double @sin(double %conv) } + define float @sqrt_test(float %f) nounwind readnone { ; CHECK: sqrt_test %conv = fpext float %f to double @@ -272,6 +273,15 @@ define float @sqrt_test(float %f) nounwind readnone { ; CHECK: call float @sqrtf(float %f) } +define float @sqrt_int_test(float %f) nounwind readnone { +; CHECK: sqrt_int_test + %conv = fpext float %f to double + %call = call double @llvm.sqrt.f64(double %conv) + %conv1 = fptrunc double %call to float + ret float %conv1 +; CHECK: call float @llvm.sqrt.f32(float %f) +} + define double @sqrt_test2(float %f) nounwind readnone { ; CHECK: sqrt_test2 %conv = fpext float %f to double @@ -331,3 +341,6 @@ declare double @acos(double) nounwind readnone declare double @acosh(double) nounwind readnone declare double @asin(double) nounwind readnone declare double @asinh(double) nounwind readnone + +declare double @llvm.sqrt.f64(double) nounwind readnone + |