[llvm] [X86] Combine VPERMV3 to VPERMV for i8/i16 (PR #96414)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 23 09:31:55 PDT 2024


================
@@ -41273,6 +41273,33 @@ static SDValue combineTargetShuffle(SDValue N, const SDLoc &DL,
 
     return SDValue();
   }
+  case X86ISD::VPERMV3: {
+    // VPERM[I,T]2[B,W] are 3 uops on Skylake and Icelake so we try to use
+    // VPERMV.
+    if (VT.is512BitVector() || (VT.is256BitVector() && !Subtarget.hasEVEX512()))
+      return SDValue();
----------------
RKSimon wrote:

Not sure, but it might be better to check the NVT type instead of VT? 

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


More information about the llvm-commits mailing list