summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86Subtarget.cpp
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2012-08-13 17:26:46 +0000
committerManman Ren <mren@apple.com>2012-08-13 17:26:46 +0000
commitde7f1c251705cad8dc86f498402045235ff8aaaa (patch)
treea53102fbf8af0beb58a8c18e52247ee8746baa03 /lib/Target/X86/X86Subtarget.cpp
parenta3a3219b3a972db6449548abf7e0c9112e8ce7b9 (diff)
downloadllvm-de7f1c251705cad8dc86f498402045235ff8aaaa.tar.gz
llvm-de7f1c251705cad8dc86f498402045235ff8aaaa.tar.bz2
llvm-de7f1c251705cad8dc86f498402045235ff8aaaa.tar.xz
X86: when auto-detecting the subtarget features, make sure use IsIntel to detect
Nehalem, Westmere and Sandy Bridge. AMD also has processor family 6. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161763 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--lib/Target/X86/X86Subtarget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index d7e3efc4f9..908785296d 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -248,9 +248,9 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
// 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);
}