[llvm] [RISCV] Use cached SubtargetInfo in AsmPrinter (PR #147269)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 7 03:26:45 PDT 2025
================
@@ -1070,22 +1066,17 @@ bool RISCVAsmPrinter::lowerOperand(const MachineOperand &MO,
}
static bool lowerRISCVVMachineInstrToMCInst(const MachineInstr *MI,
- MCInst &OutMI) {
+ MCInst &OutMI,
+ const RISCVSubtarget *STI) {
const RISCVVPseudosTable::PseudoInfo *RVV =
RISCVVPseudosTable::getPseudoInfo(MI->getOpcode());
if (!RVV)
return false;
OutMI.setOpcode(RVV->BaseInstr);
- const MachineBasicBlock *MBB = MI->getParent();
- assert(MBB && "MI expected to be in a basic block");
- const MachineFunction *MF = MBB->getParent();
- assert(MF && "MBB expected to be in a machine function");
----------------
artagnon wrote:
Why have these asserts been stripped?
https://github.com/llvm/llvm-project/pull/147269
More information about the llvm-commits
mailing list