[PATCH] D10593: [X86][AVX] Add support for shuffle decoding of vperm2f128/vperm2i128 with zero'd lanes

Simon Pilgrim llvm-dev at redking.me.uk
Mon Jul 6 09:14:44 PDT 2015


Thanks Sanjay.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:4455
@@ -4453,1 +4454,3 @@
     if (Mask.empty()) return false;
+    // Mask only contains -ve index if an element is zero.
+    if (std::any_of(Mask.begin(), Mask.end(), [](int M){ return M < 0; }))
----------------
spatel wrote:
> -ve ?
I'll replace it with 'negative'

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:4456
@@ +4455,3 @@
+    // Mask only contains -ve index if an element is zero.
+    if (std::any_of(Mask.begin(), Mask.end(), [](int M){ return M < 0; }))
+      return false;
----------------
spatel wrote:
> Should this check be:
>   M == SM_SentinelZero
At the moment none of the functions that call getTargetShuffleMask support SM_SentinelZero, they treat any negative shuffle index value as UNDEF (hence the FIXME comment I added above) so we can't support this aspect of VPERM2X128 yet.


Repository:
  rL LLVM

http://reviews.llvm.org/D10593







More information about the llvm-commits mailing list