File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ struct RuntimeLibcallsInfo {
116
116
// opcode.
117
117
CmpInst::Predicate SoftFloatCompareLibcallPredicates[RTLIB::UNKNOWN_LIBCALL];
118
118
119
- static bool darwinHasSinCos (const Triple &TT) {
119
+ static bool darwinHasSinCosStret (const Triple &TT) {
120
120
assert (TT.isOSDarwin () && " should be called with darwin triple" );
121
121
// Don't bother with 32 bit x86.
122
122
if (TT.getArch () == Triple::x86)
@@ -131,6 +131,12 @@ struct RuntimeLibcallsInfo {
131
131
return true ;
132
132
}
133
133
134
+ // / Return true if the target has sincosf/sincos/sincosl functions
135
+ static bool hasSinCos (const Triple &TT) {
136
+ return TT.isGNUEnvironment () || TT.isOSFuchsia () ||
137
+ (TT.isAndroid () && !TT.isAndroidVersionLT (9 ));
138
+ }
139
+
134
140
void initSoftFloatCmpLibcallPredicates ();
135
141
136
142
// / Set default libcall names. If a target wants to opt-out of a libcall it
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
271
271
break ;
272
272
}
273
273
274
- if (darwinHasSinCos (TT)) {
274
+ if (darwinHasSinCosStret (TT)) {
275
275
setLibcallName (RTLIB::SINCOS_STRET_F32, " __sincosf_stret" );
276
276
setLibcallName (RTLIB::SINCOS_STRET_F64, " __sincos_stret" );
277
277
if (TT.isWatchABI ()) {
@@ -315,8 +315,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
315
315
setLibcallName (RTLIB::EXP10_F64, " __exp10" );
316
316
}
317
317
318
- if (TT.isGNUEnvironment () || TT.isOSFuchsia () ||
319
- (TT.isAndroid () && !TT.isAndroidVersionLT (9 ))) {
318
+ if (hasSinCos (TT)) {
320
319
setLibcallName (RTLIB::SINCOS_F32, " sincosf" );
321
320
setLibcallName (RTLIB::SINCOS_F64, " sincos" );
322
321
setLibcallName (RTLIB::SINCOS_F80, " sincosl" );
You can’t perform that action at this time.
0 commit comments