aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-12-19 20:24:12 +0000
committerMatthias Braun <matze@braunis.de>2017-12-19 20:24:12 +0000
commitd2d7fb63f79e80f6bbd864253bda8b94d46d1f20 (patch)
tree3e27039475ede7ef76ddaa78ddaa52cff8a3480f /llvm/lib/CodeGen/TargetLoweringBase.cpp
parentd451da1bd1626994334fe130e69fb045ab3f3875 (diff)
downloadllvm-d2d7fb63f79e80f6bbd864253bda8b94d46d1f20.zip
llvm-d2d7fb63f79e80f6bbd864253bda8b94d46d1f20.tar.gz
llvm-d2d7fb63f79e80f6bbd864253bda8b94d46d1f20.tar.bz2
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
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index bef64a5..224ae1a 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -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.