[clang] [llvm] [RISCV][P-ext] Support Packed Multiply High (PR #211223)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 24 01:08:17 PDT 2026


================
@@ -16423,8 +16486,8 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
         Opc = RISCVISD::MULQR;
         break;
       default:
-        // pas/psa/psas/pssa/paas/pasa and pmerge: re-emit at the widened type
----------------
sihuan wrote:

`pmulh*` have a concrete opcode from `getRVPMulHighOpcode`, so they shouldn't fall through here — handle them like `paadd`/`pmulq` above:
```cpp
case Intrinsic::riscv_pmulh:
case Intrinsic::riscv_pmulhr:
case Intrinsic::riscv_pmulhu:
case Intrinsic::riscv_pmulhru:
case Intrinsic::riscv_pmulhsu:
case Intrinsic::riscv_pmulhrsu:
  Opc = getRVPMulHighOpcode(IntNo);
  break;
```
The re-emit fallback is for ops with no single-node form (pas/psa/pmerge).

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


More information about the cfe-commits mailing list