[PATCH] [x86] Teach the target-specific combining how to aggressively foldhalf-shuffles, even looking through intervening instructions in a chain.

Chandler Carruth chandlerc at gmail.com
Fri Jun 27 04:41:30 PDT 2014


Applying with suggested fixes generally. Thanks!

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:19002
@@ +19001,3 @@
+      // We can only handle pshufd if the half we are combining either stay in
+      // their half, or switch halves. Bail if one of these isn't true.
+      SmallVector<int, 4> VMask = getPSHUFShuffleMask(V);
----------------
Jim Grosbach wrote:
> grammar. "if the halves" maybe what you meant?
No, its the rest of the sentence that had the wrong grammar. =]

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:19006
@@ +19005,3 @@
+      // Bail if the PSHUFD doesn't keep both dwords being shuffled in a single
+      // half of its input.
+      if (!((VMask[DOffset + 0] < 2 && VMask[DOffset + 1] < 2) ||
----------------
Jim Grosbach wrote:
> "of it's input" sounds odd, but I'm not sure it's wrong. Can you rephrase?
Old comment, the one above i think is closer despite the grammar fail. Nuked this one.

http://reviews.llvm.org/D4291






More information about the llvm-commits mailing list