[llvm] [RISCV][llvm] Preliminary P extension codegen support (PR #162668)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 10:18:29 PST 2025


================
@@ -1463,8 +1463,95 @@ let Predicates = [HasStdExtP, IsRV32] in {
 
 def riscv_absw : RVSDNode<"ABSW", SDTIntUnaryOp>;
 
-let Predicates = [HasStdExtP] in
-def : PatGpr<abs, ABS>;
+def SDT_RISCVPLI : SDTypeProfile<1, 1, [SDTCisVec<0>,
+                                        SDTCisInt<0>,
+                                        SDTCisInt<1>]>;
+def riscv_pli : RVSDNode<"PLI", SDT_RISCVPLI>;
+def SDT_RISCVPASUB : SDTypeProfile<1, 2, [SDTCisVec<0>,
+                                          SDTCisInt<0>,
+                                          SDTCisSameAs<0, 1>,
+                                          SDTCisSameAs<0, 2>]>;
+def riscv_pasub : RVSDNode<"PASUB", SDT_RISCVPASUB>;
+def SDT_RISCVPASUBU : SDTypeProfile<1, 2, [SDTCisVec<0>,
----------------
topperc wrote:

Can we use the same type profile for riscv_pasub and riscv_pasubu?

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


More information about the llvm-commits mailing list