[llvm-commits] [llvm] r161717 - in /llvm/trunk: lib/Target/X86/X86Subtarget.cpp test/CodeGen/X86/alignment-2.ll

Manman Ren mren at apple.com
Fri Aug 10 16:43:32 PDT 2012


Author: mren
Date: Fri Aug 10 18:43:32 2012
New Revision: 161717

URL: http://llvm.org/viewvc/llvm-project?rev=161717&view=rev
Log:
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

Modified:
    llvm/trunk/lib/Target/X86/X86Subtarget.cpp
    llvm/trunk/test/CodeGen/X86/alignment-2.ll

Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=161717&r1=161716&r2=161717&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Fri Aug 10 18:43:32 2012
@@ -246,8 +246,11 @@
     }
 
     // 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);
     }

Modified: llvm/trunk/test/CodeGen/X86/alignment-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/alignment-2.ll?rev=161717&r1=161716&r2=161717&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/alignment-2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/alignment-2.ll Fri Aug 10 18:43:32 2012
@@ -18,7 +18,9 @@
 define signext i8 @do_lo_list() nounwind optsize ssp {
 bb:
 ; CHECK:     do_lo_list
-; CHECK-NOT: movaps
+; Make sure we do not use movaps for the global variable.
+; It is okay to use movaps for writing the local variable on stack.
+; CHECK-NOT: movaps {{[0-9]*}}(%{{[a-z]*}}), {{%xmm[0-9]}}
   %myopt = alloca %struct.printQueryOpt, align 4
   %tmp = bitcast %struct.printQueryOpt* %myopt to i8*
   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* bitcast (%struct.printQueryOpt* getelementptr inbounds (%struct._psqlSettings* @pset, i32 0, i32 4) to i8*), i32 76, i32 4, i1 false)





More information about the llvm-commits mailing list