Skip to content

Commit 6614b4f

Browse files
committed
Limit to __builtin calls
1 parent 2884e95 commit 6614b4f

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3264,9 +3264,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
32643264
return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(
32653265
*this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh));
32663266

3267-
case Builtin::BIsincos:
3268-
case Builtin::BIsincosf:
3269-
case Builtin::BIsincosl:
32703267
case Builtin::BI__builtin_sincos:
32713268
case Builtin::BI__builtin_sincosf:
32723269
case Builtin::BI__builtin_sincosf16:

clang/test/CodeGen/AArch64/sincos.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// RUN: %clang_cc1 -triple=aarch64-gnu-linux -emit-llvm -O1 %s -o - | FileCheck --check-prefix=NO-MATH-ERRNO %s
22
// RUN: %clang_cc1 -triple=aarch64-gnu-linux -emit-llvm -fmath-errno %s -o - | FileCheck --check-prefix=MATH-ERRNO %s
33

4-
void sincos(double, double*, double*);
5-
void sincosf(float, float*, float*);
6-
void sincosl(long double, long double*, long double*);
7-
84
// NO-MATH-ERRNO-LABEL: @sincos_f32
95
// NO-MATH-ERRNO: [[SINCOS:%.*]] = tail call { float, float } @llvm.sincos.f32(float {{.*}})
106
// NO-MATH-ERRNO-NEXT: [[SIN:%.*]] = extractvalue { float, float } [[SINCOS]], 0
@@ -16,7 +12,7 @@ void sincosl(long double, long double*, long double*);
1612
// MATH-ERRNO: call void @sincosf(
1713
//
1814
void sincos_f32(float x, float* fp0, float* fp1) {
19-
sincosf(x, fp0, fp1);
15+
__builtin_sincosf(x, fp0, fp1);
2016
}
2117

2218
// NO-MATH-ERRNO-LABEL: @sincos_f64
@@ -30,7 +26,7 @@ void sincos_f32(float x, float* fp0, float* fp1) {
3026
// MATH-ERRNO: call void @sincos(
3127
//
3228
void sincos_f64(double x, double* dp0, double* dp1) {
33-
sincos(x, dp0, dp1);
29+
__builtin_sincos(x, dp0, dp1);
3430
}
3531

3632
// NO-MATH-ERRNO-LABEL: @sincos_f128
@@ -44,5 +40,5 @@ void sincos_f64(double x, double* dp0, double* dp1) {
4440
// MATH-ERRNO: call void @sincosl(
4541
//
4642
void sincos_f128(long double x, long double* ldp0, long double* ldp1) {
47-
sincosl(x, ldp0, ldp1);
43+
__builtin_sincosl(x, ldp0, ldp1);
4844
}

0 commit comments

Comments
 (0)