[llvm] [RISCV] Use frmarg instead of ixlenimm in PseudoFROUND. NFC (PR #171563)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 9 21:16:20 PST 2025


https://github.com/topperc created https://github.com/llvm/llvm-project/pull/171563

This is expanded with a custom inserter and this immediate will be copied to the frm operand of a non-pseudo instruction.

>From 16ad56b6de2642d2f9361dd90de756802aa4725f Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Tue, 9 Dec 2025 21:12:45 -0800
Subject: [PATCH] [RISCV] Use frmarg instead of ixlenimm in PseudoFROUND.

This is expanded with a custom inserter and this immediate will
be copied to the frm operand of a non-pseudo instruction.
---
 llvm/lib/Target/RISCV/RISCVInstrInfoF.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoF.td b/llvm/lib/Target/RISCV/RISCVInstrInfoF.td
index bd191001b75ec..13b23a573da0e 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoF.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoF.td
@@ -316,7 +316,7 @@ multiclass FPCmp_rr_m<bits<7> funct7, bits<3> funct3, string opcodestr,
 }
 
 class PseudoFROUND<DAGOperand Ty, ValueType vt, ValueType intvt = XLenVT>
-    : Pseudo<(outs Ty:$rd), (ins Ty:$rs1, Ty:$rs2, ixlenimm:$rm),
+    : Pseudo<(outs Ty:$rd), (ins Ty:$rs1, Ty:$rs2, frmarg:$rm),
       [(set Ty:$rd, (vt (riscv_fround Ty:$rs1, Ty:$rs2, (intvt timm:$rm))))]> {
   let hasSideEffects = 0;
   let mayLoad = 0;



More information about the llvm-commits mailing list