X86JITInfo: [x86] Rework r206240, X86CompilationCallback_SSE() should be called for...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 15 Apr 2014 08:28:23 +0000 (08:28 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 15 Apr 2014 08:28:23 +0000 (08:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206261 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86JITInfo.cpp

index 481240d1f5131146d783d5c9be90c1b4cd26e99a..ebf991190f3359924c5c63fbd896571fa6281580 100644 (file)
@@ -426,8 +426,14 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) {
   JITCompilerFunction = F;
   TsanIgnoreWritesEnd();
 
-#if defined (X86_32_JIT) && !defined (_MSC_VER) && defined(__SSE__)
+#if defined (X86_32_JIT) && !defined (_MSC_VER)
+#if defined(__SSE__)
+  // SSE Callback should be called for SSE-enabled LLVM.
   return X86CompilationCallback_SSE;
+#else
+  if (Subtarget->hasSSE1())
+    return X86CompilationCallback_SSE;
+#endif
 #endif
 
   return X86CompilationCallback;