[PATCH] D16537: [X86][AVX] Lower shuffles as repeated lane shuffles then lane-crossing shuffles

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 12:35:11 PST 2016


ab added a subscriber: ab.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10645
@@ +10644,3 @@
+/// to the destination lanes.
+static SDValue LowerShuffleAsRepeatedMaskAndLanePermute(
+    SDLoc DL, MVT VT, SDValue V1, SDValue V2, ArrayRef<int> Mask,
----------------
Lower -> lower?

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10732
@@ +10731,3 @@
+    int SrcSubLane = (((M % NumElts) / NumLaneElts) * SubLaneScale) +
+                     ((i % NumLaneElts) / NumSubLaneElts);
+    int &Dst2SrcSubLane = Dst2SrcSubLanes[i / NumSubLaneElts];
----------------
I found this non-obvious; it might help to split it in two?

IIUC the first part picks the lane and the second part picks the sublane, right?


Repository:
  rL LLVM

http://reviews.llvm.org/D16537





More information about the llvm-commits mailing list