Home | History | Annotate | Download | only in InstCombine
      1 ; RUN: opt -instcombine -S < %s | FileCheck %s
      2 
      3 define double @test1() {
      4   %sin = call double @__sinpi(double 1.0)
      5   ret double %sin
      6 }
      7 
      8 ; CHECK-LABEL: define double @test1(
      9 ; CHECK: %[[sin:.*]] = call double @__sinpi(double 1.000000e+00)
     10 ; CHECK-NEXT: ret double %[[sin]]
     11 
     12 define double @test2() {
     13   %cos = call double @__cospi(double 1.0)
     14   ret double %cos
     15 }
     16 
     17 ; CHECK-LABEL: define double @test2(
     18 ; CHECK: %[[cos:.*]] = call double @__cospi(double 1.000000e+00)
     19 ; CHECK-NEXT: ret double %[[cos]]
     20 
     21 declare double @__sinpi(double %x) #0
     22 declare double @__cospi(double %x) #0
     23 
     24 attributes #0 = { readnone nounwind }
     25