[llvm] [RISCV][llvm-exegesis] Add missing operand frm for FCVT_D_W (PR #149989)
Jim Lin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 22 02:54:56 PDT 2025
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/149989
We encountered the index of operand out of bounds crash because FCVT_D_W lacks frm operand.
>From 33b313b64ed23de49e2857306fcdc47ec044cfdf Mon Sep 17 00:00:00 2001
From: Jim Lin <jim at andestech.com>
Date: Tue, 22 Jul 2025 15:59:44 +0800
Subject: [PATCH] [RISCV][llvm-exegesis] Add missing operand frm for FCVT_D_W
We encountered the index of operand out of bounds crash because FCVT_D_W lacks frm operand.
---
llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp b/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp
index 676479b3d5792..d54df2b5dc0ef 100644
--- a/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp
@@ -651,8 +651,10 @@ static std::vector<MCInst> loadFP64RegBits32(const MCSubtargetInfo &STI,
}
std::vector<MCInst> Instrs = loadIntReg(STI, ScratchIntReg, Bits);
- Instrs.push_back(
- MCInstBuilder(RISCV::FCVT_D_W).addReg(Reg).addReg(ScratchIntReg));
+ Instrs.push_back(MCInstBuilder(RISCV::FCVT_D_W)
+ .addReg(Reg)
+ .addReg(ScratchIntReg)
+ .addImm(7));
return Instrs;
}
More information about the llvm-commits
mailing list