[clang] [llvm] [RISCV][P-ext] Support Packed Narrowing Zip (PR #210040)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 16 22:18:06 PDT 2026


================
@@ -2838,6 +2852,17 @@ let append Predicates = [IsRV64] in {
             (ZIP8P GPR:$rs1, GPR:$rs2)>;
   def : Pat<(v4i16 (riscv_pzip (v4i16 GPR:$rs1), (v4i16 GPR:$rs2))),
             (ZIP16P GPR:$rs1, GPR:$rs2)>;
+
+  // Packed narrowing zip: pair the low (even) / high (odd) byte/halfword of
+  // each widened element of rs1 and rs2.
----------------
topperc wrote:

```suggestion
  // Packed pair: pair the even/odd-position elements of rs1 and rs2.
```

These patterns are used for more than just narrowing zip.

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


More information about the cfe-commits mailing list