From 9e15e2114b5ab45dba6830f1db483aa2ffff406c Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 19 Dec 2017 20:24:12 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321104 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/TargetLoweringBase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/TargetLoweringBase.cpp b/lib/CodeGen/TargetLoweringBase.cpp index bef64a57bd9..224ae1a3236 100644 --- a/lib/CodeGen/TargetLoweringBase.cpp +++ b/lib/CodeGen/TargetLoweringBase.cpp @@ -91,7 +91,10 @@ static cl::opt 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. -- 2.50.0