Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -mtriple=armv7-apple-ios6 -mcpu=cortex-a8 | FileCheck %s --check-prefix=NOOPT
      2 ; RUN: llc < %s -mtriple=armv7-apple-ios7 -mcpu=cortex-a8 | FileCheck %s --check-prefix=SINCOS
      3 
      4 ; Combine sin / cos into a single call.
      5 ; rdar://12856873
      6 
      7 define float @test1(float %x) nounwind {
      8 entry:
      9 ; SINCOS-LABEL: test1:
     10 ; SINCOS: bl ___sincosf_stret
     11 
     12 ; NOOPT-LABEL: test1:
     13 ; NOOPT: bl _sinf
     14 ; NOOPT: bl _cosf
     15   %call = tail call float @sinf(float %x) nounwind readnone
     16   %call1 = tail call float @cosf(float %x) nounwind readnone
     17   %add = fadd float %call, %call1
     18   ret float %add
     19 }
     20 
     21 define double @test2(double %x) nounwind {
     22 entry:
     23 ; SINCOS-LABEL: test2:
     24 ; SINCOS: bl ___sincos_stret
     25 
     26 ; NOOPT-LABEL: test2:
     27 ; NOOPT: bl _sin
     28 ; NOOPT: bl _cos
     29   %call = tail call double @sin(double %x) nounwind readnone
     30   %call1 = tail call double @cos(double %x) nounwind readnone
     31   %add = fadd double %call, %call1
     32   ret double %add
     33 }
     34 
     35 declare float  @sinf(float) readonly
     36 declare double @sin(double) readonly
     37 declare float @cosf(float) readonly
     38 declare double @cos(double) readonly
     39