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 {
116116 // opcode.
117117 CmpInst::Predicate SoftFloatCompareLibcallPredicates[RTLIB::UNKNOWN_LIBCALL];
118118
119- static bool darwinHasSinCos (const Triple &TT) {
119+ static bool darwinHasSinCosStret (const Triple &TT) {
120120 assert (TT.isOSDarwin () && " should be called with darwin triple" );
121121 // Don't bother with 32 bit x86.
122122 if (TT.getArch () == Triple::x86)
@@ -131,6 +131,12 @@ struct RuntimeLibcallsInfo {
131131 return true ;
132132 }
133133
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+
134140 void initSoftFloatCmpLibcallPredicates ();
135141
136142 // / 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 @@ -412,7 +412,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
412412 break ;
413413 }
414414
415- if (darwinHasSinCos (TT)) {
415+ if (darwinHasSinCosStret (TT)) {
416416 setLibcallName (RTLIB::SINCOS_STRET_F32, " __sincosf_stret" );
417417 setLibcallName (RTLIB::SINCOS_STRET_F64, " __sincos_stret" );
418418 if (TT.isWatchABI ()) {
@@ -456,8 +456,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
456456 setLibcallName (RTLIB::EXP10_F64, " __exp10" );
457457 }
458458
459- if (TT.isGNUEnvironment () || TT.isOSFuchsia () ||
460- (TT.isAndroid () && !TT.isAndroidVersionLT (9 ))) {
459+ if (hasSinCos (TT)) {
461460 setLibcallName (RTLIB::SINCOS_F32, " sincosf" );
462461 setLibcallName (RTLIB::SINCOS_F64, " sincos" );
463462 setLibcallName (RTLIB::SINCOS_F80, " sincosl" );
You can’t perform that action at this time.
0 commit comments