[llvm-commits] [llvm] r161763 - /llvm/trunk/lib/Target/X86/X86Subtarget.cpp

Manman Ren mren at apple.com
Mon Aug 13 10:26:46 PDT 2012


Author: mren
Date: Mon Aug 13 12:26:46 2012
New Revision: 161763

URL: http://llvm.org/viewvc/llvm-project?rev=161763&view=rev
Log:
X86: when auto-detecting the subtarget features, make sure use IsIntel to detect
Nehalem, Westmere and Sandy Bridge. AMD also has processor family 6.

Modified:
    llvm/trunk/lib/Target/X86/X86Subtarget.cpp

Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=161763&r1=161762&r2=161763&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Mon Aug 13 12:26:46 2012
@@ -248,9 +248,9 @@
     // If it's Nehalem, unaligned memory access is fast.
     // Include Westmere and Sandy Bridge as well.
     // FIXME: add later processors.
-    if ((Family == 6 && Model == 26) ||
+    if (IsIntel && ((Family == 6 && Model == 26) ||
         (Family == 6 && Model == 44) ||
-        (Family == 6 && Model == 42)) {
+        (Family == 6 && Model == 42))) {
       IsUAMemFast = true;
       ToggleFeature(X86::FeatureFastUAMem);
     }





More information about the llvm-commits mailing list