pow-3.ll 472 B

123456789101112
  1. ; Test that the pow won't get simplified to sqrt(fabs) when they are not available.
  2. ;
  3. ; RUN: opt < %s -disable-simplify-libcalls -instcombine -S | FileCheck %s
  4. declare double @llvm.pow.f64(double %Val, double %Power)
  5. define double @test_simplify_unavailable(double %x) {
  6. ; CHECK-LABEL: @test_simplify_unavailable(
  7. %retval = call double @llvm.pow.f64(double %x, double 0.5)
  8. ; CHECK-NEXT: call double @llvm.pow.f64(double %x, double 5.000000e-01)
  9. ret double %retval
  10. }