[clang] [llvm] [RISCV][P-ext] Improve codegen for packed reverse intrinsics (PR #207575)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 5 19:01:08 PDT 2026


================
@@ -2453,6 +2458,19 @@ let append Predicates = [IsRV32] in {
                         (BuildGPRPair (REV_RV32 (EXTRACT_SUBREG GPRPair:$rs, sub_gpr_even)),
                                       (REV_RV32 (EXTRACT_SUBREG GPRPair:$rs, sub_gpr_odd))))>;
 
+  // Element reverse (prev): swap the two halves and reverse within each.
+  def : Pat<(v8i8 (vector_reverse (v8i8 GPRPair:$rs))),
----------------
topperc wrote:

We should really be splitting this during lowering.

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


More information about the cfe-commits mailing list