Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt < %s -instcombine -S | FileCheck %s
      2 
      3 define double @mypow(double %x, double %y) #0 {
      4 entry:
      5   %call = call double @exp(double %x)
      6   %pow = call double @llvm.pow.f64(double %call, double %y)
      7   ret double %pow
      8 }
      9 
     10 ; CHECK-LABEL: define double @mypow(
     11 ; CHECK:   %mul = fmul fast double %x, %y
     12 ; CHECK:   %exp = call fast double @exp(double %mul) #0
     13 ; CHECK:   ret double %exp
     14 ; CHECK: }
     15 
     16 define double @test2(double ()* %fptr, double %p1) #0 {
     17   %call1 = call double %fptr()
     18   %pow = call double @llvm.pow.f64(double %call1, double %p1)
     19   ret double %pow
     20 }
     21 
     22 ; CHECK-LABEL: @test2
     23 ; CHECK: llvm.pow.f64
     24 
     25 declare double @exp(double) #1
     26 declare double @llvm.pow.f64(double, double)
     27 attributes #0 = { "unsafe-fp-math"="true" }
     28 attributes #1 = { "unsafe-fp-math"="true" }
     29