1
1
// RUN: %clang_cc1 -triple=aarch64-gnu-linux -emit-llvm -O1 %s -o - | FileCheck --check-prefix=NO-MATH-ERRNO %s
2
2
// RUN: %clang_cc1 -triple=aarch64-gnu-linux -emit-llvm -fmath-errno %s -o - | FileCheck --check-prefix=MATH-ERRNO %s
3
3
4
- void sincos (double , double * , double * );
5
- void sincosf (float , float * , float * );
6
- void sincosl (long double , long double * , long double * );
7
-
8
4
// NO-MATH-ERRNO-LABEL: @sincos_f32
9
5
// NO-MATH-ERRNO: [[SINCOS:%.*]] = tail call { float, float } @llvm.sincos.f32(float {{.*}})
10
6
// NO-MATH-ERRNO-NEXT: [[SIN:%.*]] = extractvalue { float, float } [[SINCOS]], 0
@@ -16,7 +12,7 @@ void sincosl(long double, long double*, long double*);
16
12
// MATH-ERRNO: call void @sincosf(
17
13
//
18
14
void sincos_f32 (float x , float * fp0 , float * fp1 ) {
19
- sincosf (x , fp0 , fp1 );
15
+ __builtin_sincosf (x , fp0 , fp1 );
20
16
}
21
17
22
18
// NO-MATH-ERRNO-LABEL: @sincos_f64
@@ -30,7 +26,7 @@ void sincos_f32(float x, float* fp0, float* fp1) {
30
26
// MATH-ERRNO: call void @sincos(
31
27
//
32
28
void sincos_f64 (double x , double * dp0 , double * dp1 ) {
33
- sincos (x , dp0 , dp1 );
29
+ __builtin_sincos (x , dp0 , dp1 );
34
30
}
35
31
36
32
// NO-MATH-ERRNO-LABEL: @sincos_f128
@@ -44,5 +40,5 @@ void sincos_f64(double x, double* dp0, double* dp1) {
44
40
// MATH-ERRNO: call void @sincosl(
45
41
//
46
42
void sincos_f128 (long double x , long double * ldp0 , long double * ldp1 ) {
47
- sincosl (x , ldp0 , ldp1 );
43
+ __builtin_sincosl (x , ldp0 , ldp1 );
48
44
}
0 commit comments