[llvm] [RISCV] Improve legalization of e8 m8 VL>256 shuffles (PR #79330)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 15:16:36 PST 2024


================
@@ -4936,8 +4936,11 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
     if (SDValue V = lowerVECTOR_SHUFFLEAsRotate(SVN, DAG, Subtarget))
       return V;
 
-    if (VT.getScalarSizeInBits() == 8 && VT.getVectorNumElements() > 256) {
-      // On such a large vector we're unable to use i8 as the index type.
+    if (VT.getScalarSizeInBits() == 8 &&
+        any_of(enumerate(Mask), [&](const auto &Idx) {
----------------
topperc wrote:

Why do we need enumerate?

https://github.com/llvm/llvm-project/pull/79330


More information about the llvm-commits mailing list