diff options
Diffstat (limited to 'test/Transforms/InstCombine/pow-1.ll')
-rw-r--r-- | test/Transforms/InstCombine/pow-1.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/pow-1.ll b/test/Transforms/InstCombine/pow-1.ll index 0fdafeb..9f1d073 100644 --- a/test/Transforms/InstCombine/pow-1.ll +++ b/test/Transforms/InstCombine/pow-1.ll @@ -151,4 +151,17 @@ define double @test_simplify16(double %x) { ; CHECK-NEXT: ret double [[RECIPROCAL]] } +declare double @llvm.pow.f64(double %Val, double %Power) +define double @test_simplify17(double %x) { +; CHECK-LABEL: @test_simplify17( + %retval = call double @llvm.pow.f64(double %x, double 0.5) +; CHECK-NEXT: [[SQRT:%[a-z0-9]+]] = call double @sqrt(double %x) [[NUW_RO]] +; CHECK-NEXT: [[FABS:%[a-z0-9]+]] = call double @fabs(double [[SQRT]]) [[NUW_RO]] +; CHECK-NEXT: [[FCMP:%[a-z0-9]+]] = fcmp oeq double %x, 0xFFF0000000000000 +; CHECK-NEXT: [[SELECT:%[a-z0-9]+]] = select i1 [[FCMP]], double 0x7FF0000000000000, double [[FABS]] + ret double %retval +; CHECK-NEXT: ret double [[SELECT]] +} + ; CHECK: attributes [[NUW_RO]] = { nounwind readonly } + |