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 7define float @test1(float %x) nounwind { 8entry: 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 21define double @test2(double %x) nounwind { 22entry: 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 35declare float @sinf(float) readonly 36declare double @sin(double) readonly 37declare float @cosf(float) readonly 38declare double @cos(double) readonly 39