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

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 03:42:46 PST 2015


delena added inline comments.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10367
@@ +10366,3 @@
+    int HalfIdx = (M / HalfNumElts);
+    M %= NumElts;
+
----------------
Let's assume that the original mask was:
0, 1, 3, 3, 8, 8, 10, 11
You want to take V1-Lo and V2-Lo
the new mask should be
0, 1, 3, 3, 4, 4, 6, 7
But M %= NumElts will not convert 8 to 4 and 10 to 6.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:10394
@@ +10393,3 @@
+
+
+  SDValue Half1 = GetHalfVector(HalfIdx1);
----------------
extra line


Repository:
  rL LLVM

http://reviews.llvm.org/D15477





More information about the llvm-commits mailing list