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

Boyao Wang via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 02:30:59 PDT 2026


================
@@ -176,7 +186,30 @@ multiclass VPatVZIP<SDPatternOperator vop, string instruction_name> {
   }
 }
 
+multiclass VPatVUNZIP<SDPatternOperator op, string instruction_name> {
+  foreach VtiToWti = AllZvzipVectors in {
+    defvar vti = VtiToWti.Vti;
+    defvar wti = VtiToWti.Wti;
+    let Predicates = !listconcat([HasStdExtZvzip],
+                                 GetVTypeMinimalPredicates<vti>.Predicates) in {
+      def : Pat<(vti.Vector (op (wti.Vector wti.RegClass:$rs2),
----------------
BoyaoWang430 wrote:

`VPatUnaryVL_V` assumes the input and output use the same `vti`. 
`VPatUnaryVL_V`  only iterates over `AllIntegerVectors`, while `vunzip` needs to cover the `AllZvzipVectors` set, including FP types.

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


More information about the llvm-commits mailing list