[PATCH] [x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector
Sanjay Patel
spatel at rotateright.com
Thu Jan 22 10:41:36 PST 2015
See inline comments for nitpicks. Otherwise, LGTM.
REPOSITORY
rL LLVM
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24738
@@ -24735,1 +24737,3 @@
+ // Convertion from x86mmx/i64 to v2i64 types is often done via stack
+ // store/load. Under certain conditions we can bypass the memory access and
----------------
"Conversion"
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24741
@@ +24740,3 @@
+ // combine this load to use a scalar_to_vector instead. This leads to
+ // a reduction in the stack use, redudant emission of shuffles and create
+ // isel matching candidates for movq2dq instructions.
----------------
"redundant"
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24746
@@ +24745,3 @@
+
+ // If this load is directly stored, get the original source value
+ StoreSDNode *PrevST = cast<StoreSDNode>(Chain);
----------------
Period at end of sentence.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24754
@@ +24753,3 @@
+
+ // On 32bit systems, we can't save 64bit integers, use f64 instead
+ bool Usef64 = TLI.isTypeLegal(MVT::f64) && !Subtarget->is64Bit();
----------------
Period at end of sentence.
================
Comment at: test/CodeGen/X86/2012-01-18-vbitcast.ll:5
@@ -4,3 +4,3 @@
define <2 x i32> @vcast(<2 x float> %a, <2 x float> %b) {
-;CHECK: pmovzxdq
-;CHECK: pmovzxdq
+;CHECK-NOT: pmovzxdq
+;CHECK-NOT: pmovzxdq
----------------
I was told that we should always put a space between the ';' and 'CHECK'. And yes, I realize that a very large fraction of the existing regression tests do not do this. :)
http://reviews.llvm.org/D7126
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list