• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o - %s | FileCheck %s
2
3define float @test_sincos_f32(float %f) {
4; CHECK-LABEL: test_sincos_f32:
5  %sin = call float @sinf(float %f) readnone
6  %cos = call float @cosf(float %f) readnone
7; CHECK: bl sincosf
8  %val = fadd float %sin, %cos
9  ret float %val
10}
11
12define float @test_sincos_f32_errno(float %f) {
13; CHECK-LABEL: test_sincos_f32_errno:
14  %sin = call float @sinf(float %f)
15  %cos = call float @cosf(float %f)
16; CHECK: bl sinf
17; CHECK: bl cosf
18  %val = fadd float %sin, %cos
19  ret float %val
20}
21
22define double @test_sincos_f64(double %f) {
23; CHECK-LABEL: test_sincos_f64:
24  %sin = call double @sin(double %f) readnone
25  %cos = call double @cos(double %f) readnone
26  %val = fadd double %sin, %cos
27; CHECK: bl sincos
28  ret double %val
29}
30
31define double @test_sincos_f64_errno(double %f) {
32; CHECK-LABEL: test_sincos_f64_errno:
33  %sin = call double @sin(double %f)
34  %cos = call double @cos(double %f)
35  %val = fadd double %sin, %cos
36; CHECK: bl sin
37; CHECK: bl cos
38  ret double %val
39}
40
41define fp128 @test_sincos_f128(fp128 %f) {
42; CHECK-LABEL: test_sincos_f128:
43  %sin = call fp128 @sinl(fp128 %f) readnone
44  %cos = call fp128 @cosl(fp128 %f) readnone
45  %val = fadd fp128 %sin, %cos
46; CHECK: bl sincosl
47  ret fp128 %val
48}
49
50define fp128 @test_sincos_f128_errno(fp128 %f) {
51; CHECK-LABEL: test_sincos_f128_errno:
52  %sin = call fp128 @sinl(fp128 %f)
53  %cos = call fp128 @cosl(fp128 %f)
54  %val = fadd fp128 %sin, %cos
55; CHECK: bl sinl
56; CHECK: bl cosl
57  ret fp128 %val
58}
59
60declare float  @sinf(float)
61declare double @sin(double)
62declare fp128 @sinl(fp128)
63declare float @cosf(float)
64declare double @cos(double)
65declare fp128 @cosl(fp128)
66