[llvm] [X86] Fold VPERMV3(WIDEN(X),M,WIDEN(Y)) -> VPERMV(CONCAT(X,Y),M') iff the CONCAT is free (PR #122750)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 19:50:14 PST 2025


================
@@ -42436,6 +42437,24 @@ static SDValue combineTargetShuffle(SDValue N, const SDLoc &DL,
                                          /*IsMask=*/true);
         return DAG.getNode(X86ISD::VPERMV, DL, VT, NewMask, N.getOperand(0));
       }
+      // If sources are half width, then concat and use VPERMV with adjusted
+      // mask.
----------------
phoebewang wrote:

How we check the CONCAT is free?

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


More information about the llvm-commits mailing list