aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86Subtarget.cpp
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2012-08-10 23:43:32 +0000
committerManman Ren <mren@apple.com>2012-08-10 23:43:32 +0000
commit743a2cff0422031da007bcdc70ced28c09057aea (patch)
treef0c095097969d0d24518d4a56bd8a6d0e03d42cf /lib/Target/X86/X86Subtarget.cpp
parenteb74c08192d9c9425b2d8cf08852e9e787a87881 (diff)
X86: when we are auto-detecting the subtarget features, make sure we turn on
FeatureFastUAMem for Nehalem, Westmere and Sandy Bridge. FeatureFastUAMem is already on if we pass in nehalem or westmere as a command argument. rdar: 7252306 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161717 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--lib/Target/X86/X86Subtarget.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index ae2229827b..d7e3efc4f9 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -246,8 +246,11 @@ void X86Subtarget::AutoDetectSubtargetFeatures() {
}
// If it's Nehalem, unaligned memory access is fast.
- // FIXME: Nehalem is family 6. Also include Westmere and later processors?
- if (Family == 15 && Model == 26) {
+ // Include Westmere and Sandy Bridge as well.
+ // FIXME: add later processors.
+ if ((Family == 6 && Model == 26) ||
+ (Family == 6 && Model == 44) ||
+ (Family == 6 && Model == 42)) {
IsUAMemFast = true;
ToggleFeature(X86::FeatureFastUAMem);
}