[llvm] [RISCV][P-ext] Add packed sign and zero extend intrinsics (PR #208685)

Hongyu Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 03:28:35 PDT 2026


================
@@ -11961,6 +11961,21 @@ static unsigned getRVPShiftOpcode(Intrinsic::ID IntNo) {
   }
 }
 
+static SDValue lowerPZExt(SDValue Src, const SDLoc &DL, SelectionDAG &DAG,
+                          const RISCVSubtarget &Subtarget) {
+  MVT VT = Src.getSimpleValueType();
+  MVT PPairVT =
+      MVT::getVectorVT(MVT::getIntegerVT(VT.getScalarSizeInBits() / 2),
+                       VT.getVectorNumElements() * 2);
+  Src = DAG.getBitcast(PPairVT, Src);
+  unsigned ZeroReg = !Subtarget.is64Bit() && PPairVT.getSizeInBits() == 64
----------------
XChy wrote:

Use a zero constant vector instead of x0?

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


More information about the llvm-commits mailing list