[PATCH] D15477: [X86][AVX] Only shuffle the lower half of vectors if the upper half is undefined

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 01:23:50 PST 2015


RKSimon added inline comments.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10363
@@ +10362,3 @@
+    if ((M % NumElts) >= HalfNumElts)
+      break;
+
----------------
delena wrote:
> You can exit from function in this case. I mean "return SDValue()", right?
Yes - I'll change it to return SDValue().

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10378
@@ +10377,3 @@
+    }
+    break;
+  }
----------------
delena wrote:
> Do you leave the loop at this point?
Yes - I'll change it to return SDValue().

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:11189
@@ +11188,3 @@
+  // Handle special cases where the lower or upper half is UNDEF.
+  if (SDValue V = lowerVectorShuffleWithUndefHalf(DL, VT, V1, V2, Mask, DAG))
+    return V;
----------------
delena wrote:
> I'm not sure that that is a beneficial variant for AVX-512.
> Some reasons:
>  - AVX-512 has many additional shuffles, we plan to add more patterns in the future
> - In KNL target (no VLX, BWI, DQ) you are moving down to AVX2, we have less registers, less shuffles.
> - SKX (withVLX, BWI, DQ)  supports 256-bit vectors, but we currently don't have any additional optimization for 256-bit vectors on SKX.
OK - I'll drop AVX512 support.


Repository:
  rL LLVM

http://reviews.llvm.org/D15477





More information about the llvm-commits mailing list