diff options
Diffstat (limited to 'llvm/test/Transforms/InstCombine/pow-exp-nofastmath.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/pow-exp-nofastmath.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/pow-exp-nofastmath.ll b/llvm/test/Transforms/InstCombine/pow-exp-nofastmath.ll new file mode 100644 index 00000000000..ef9b3a6a78d --- /dev/null +++ b/llvm/test/Transforms/InstCombine/pow-exp-nofastmath.ll @@ -0,0 +1,16 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -instcombine -S | FileCheck %s + +define double @mypow(double %x, double %y) { +; CHECK-LABEL: @mypow( +; CHECK-NEXT: [[CALL:%.*]] = call double @exp(double [[X:%.*]]) +; CHECK-NEXT: [[POW:%.*]] = call double @llvm.pow.f64(double [[CALL]], double [[Y:%.*]]) +; CHECK-NEXT: ret double [[POW]] +; + %call = call double @exp(double %x) + %pow = call double @llvm.pow.f64(double %call, double %y) + ret double %pow +} + +declare double @exp(double) #1 +declare double @llvm.pow.f64(double, double) |