1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

TargetLoweringBase: Fix darwinHasSinCos()

Another followup to my refactoring in r321036: Turns out we can end up
with an x86 darwin target that is not macos (simulator triples can look
like i386-apple-ios) so we need the x86/32bit check in all cases.

llvm-svn: 321104
This commit is contained in:
Matthias Braun 2017-12-19 20:24:12 +00:00
parent 122c4697d0
commit c4c1d5b0b3

View File

@ -91,7 +91,10 @@ static cl::opt<unsigned> OptsizeJumpTableDensity(
static bool darwinHasSinCos(const Triple &TT) {
assert(TT.isOSDarwin() && "should be called with darwin triple");
// Macos < 10.9 has no sincos_stret and we don't bother for 32bit code.
// Don't bother with 32 bit x86.
if (TT.getArch() == Triple::x86)
return false;
// Macos < 10.9 has no sincos_stret.
if (TT.isMacOSX())
return !TT.isMacOSXVersionLT(10, 9) && TT.isArch64Bit();
// iOS < 7.0 has no sincos_stret.