Names[RTLIB::FPROUND_F32_F16] = "__gnu_f2h_ieee";
}
- if (TT.isGNUEnvironment()) {
+ if (TT.isGNUEnvironment() || TT.isOSFuchsia()) {
Names[RTLIB::SINCOS_F32] = "sincosf";
Names[RTLIB::SINCOS_F64] = "sincos";
Names[RTLIB::SINCOS_F80] = "sincosl";
}
bool X86Subtarget::hasSinCos() const {
- return getTargetTriple().isMacOSX() &&
- !getTargetTriple().isMacOSXVersionLT(10, 9) &&
- is64Bit();
+ if (getTargetTriple().isMacOSX()) {
+ return !getTargetTriple().isMacOSXVersionLT(10, 9) && is64Bit();
+ } else if (getTargetTriple().isOSFuchsia()) {
+ return true;
+ }
+ return false;
}
/// Return true if the subtarget allows calls to immediate address.
; RUN: llc < %s -mtriple=x86_64-pc-linux-gnu -mcpu=core2 | FileCheck %s --check-prefix=GNU_SINCOS
; RUN: llc < %s -mtriple=x86_64-pc-linux-gnu -mcpu=core2 -enable-unsafe-fp-math | FileCheck %s --check-prefix=GNU_SINCOS_FASTMATH
; RUN: llc < %s -mtriple=x86_64-pc-linux-gnux32 -mcpu=core2 -enable-unsafe-fp-math | FileCheck %s --check-prefix=GNU_SINCOS_FASTMATH
+; RUN: llc < %s -mtriple=x86_64-fuchsia -mcpu=core2 | FileCheck %s --check-prefix=GNU_SINCOS
+; RUN: llc < %s -mtriple=x86_64-fuchsia -mcpu=core2 -enable-unsafe-fp-math | FileCheck %s --check-prefix=GNU_SINCOS_FASTMATH
; Combine sin / cos into a single call unless they may write errno (as
; captured by readnone attrbiute, controlled by clang -fmath-errno