[PATCH] D19198: [X86][AVX] Generalized matching for target shuffle combines

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 06:05:21 PDT 2016


delena added a comment.

In http://reviews.llvm.org/D19198#424535, @RKSimon wrote:

> Added AVX512 mask tests - the masked operations are still there.
>
> Annoyingly the shuffle comments doesn't refer to the mask kregister - is there an accepted convention that we could possibly use to make this more clear?


We should add mask register to the printed shuffle. Not in this patch, of course.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24020
@@ +24019,3 @@
+
+  if (!FloatDomain)
+    return false;
----------------
I still think that when you replace a shuffle with loading indices to MOVDDUP, the MOVDDUP is better.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24067
@@ +24066,3 @@
+    if (Mask.equals({0, 0, 2, 2, 4, 4, 6, 6})) {
+      Shuffle = X86ISD::MOVDDUP;
+      ShuffleVT = MVT::v8f64;
----------------
Can you keep the original VT here?

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24105
@@ +24104,3 @@
+    }
+    if (Mask.equals({0, 0, 1, 1}) && FloatDomain) {
+      Shuffle = X86ISD::UNPCKL;
----------------
Unpack operation is not in FP domain. Again, even if you switch domains, the penalty in old processors is very low.

You still may see slowdown on some benchmarks, since while switching from load+shuffle to shuffle you reach another port. It is just FYI. 


Repository:
  rL LLVM

http://reviews.llvm.org/D19198





More information about the llvm-commits mailing list