[clang] [llvm] [RISCV][P-ext] Support Packed Narrowing Clip Pair (PR #215779)

via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 13 00:03:28 PDT 2026


================
@@ -12302,6 +12283,77 @@ SDValue RISCVTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
     return DAG.getNode(Opc, DL, Op.getValueType(), Op.getOperand(1),
                        Op.getOperand(2));
   }
+  case Intrinsic::riscv_pnclipp:
+  case Intrinsic::riscv_pnclipup: {
+    EVT VT = Op.getValueType();
+    SDValue Rs1 = Op.getOperand(1);
+    SDValue Rs2 = Op.getOperand(2);
+    unsigned Opc = IntNo == Intrinsic::riscv_pnclipp ? RISCVISD::PNCLIPP
+                                                     : RISCVISD::PNCLIPUP;
+
+    if (Subtarget.is64Bit()) {
+      if (VT == MVT::v2i32 && !Rs1.getValueType().isVector()) {
+        unsigned WOpc = IntNo == Intrinsic::riscv_pnclipp
----------------
TelGome wrote:

done

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


More information about the cfe-commits mailing list