[llvm] [RISCV][CodeGen] Add initial CodeGen support of vpair{e, o} (PR #192918)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 23:51:09 PDT 2026


================
@@ -6497,24 +6498,28 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
       return convertFromScalableVector(VT, Res, DAG, Subtarget);
     }
 
-    if (Subtarget.hasVendorXRivosVizip()) {
+    if (Subtarget.hasVendorXRivosVizip() || Subtarget.hasStdExtZvzip()) {
       bool TryWiden = false;
       unsigned Factor;
       if (isZipEven(SrcInfo, Mask, Factor)) {
         if (Factor == 1) {
           SDValue Src1 = SrcInfo[0].first == 0 ? V1 : V2;
           SDValue Src2 = SrcInfo[1].first == 0 ? V1 : V2;
-          return lowerVZIP(RISCVISD::RI_VZIPEVEN_VL, Src1, Src2, DL, DAG,
-                           Subtarget);
+          unsigned int Opc = Subtarget.hasStdExtZvzip()
+                                 ? RISCVISD::VPAIRE_VL
+                                 : RISCVISD::RI_VZIPEVEN_VL;
+          return lowerVZIP(Opc, Src1, Src2, DL, DAG, Subtarget);
         }
         TryWiden = true;
       }
       if (isZipOdd(SrcInfo, Mask, Factor)) {
----------------
wangpc-pp wrote:

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

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


More information about the llvm-commits mailing list