[SimplifyLibCalls] Tranform log(pow(x, y)) -> y*log(x).
[oota-llvm.git] / test / Transforms / InstCombine / log-pow-nofastmath.ll
1 ; RUN: opt < %s -instcombine -S | FileCheck %s
2
3 define double @mylog(double %x, double %y) #0 {
4 entry:
5   %pow = call double @llvm.pow.f64(double %x, double %y)
6   %call = call double @log(double %pow) #0
7   ret double %call
8 }
9
10 ; CHECK-LABEL: define double @mylog(
11 ; CHECK:   %pow = call double @llvm.pow.f64(double %x, double %y)
12 ; CHECK:   %call = call double @log(double %pow)
13 ; CHECK:   ret double %call
14 ; CHECK: }
15
16 declare double @log(double) #0
17 declare double @llvm.pow.f64(double, double)