[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
================
@@ -1034,6 +1046,14 @@ void RISCVDAGToDAGISel::Select(SDNode *Node) {
if (!isInt<32>(Imm) && isUInt<32>(Imm) && hasAllWUsers(Node))
Imm = SignExtend64<32>(Imm);
+ if (hasAllWUsers(Node) && isApplicableToPLI(Imm) &&
+ Subtarget->enablePExtCodeGen()) {
----------------
topperc wrote:
Do the enablePExtCodeGen and isApplicableToPLI checks first, hasAllWUsers is expensive.
https://github.com/llvm/llvm-project/pull/162668
More information about the llvm-commits
mailing list