Description
MIR printing is broken when trying to serialize the output after PrologEpilogInserter (-run-pass=prologepilog
or -stop-after
).
llc -mtriple=riscv32 -mattr=+zcmp -x mir -run-pass=prologepilog -verify-machineinstrs -o -
zcmp-cm-push-pop.mir:
Assertion failed: (unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && "Invalid Object Idx!"), function isDeadObjectIndex, file MachineFrameInfo.h, line 747.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Zcmp/save-restore-libcalls have pre-defined frame indices for the saved registers but they're never allocated in MachineFrameInfo
. When MIRPrinting occurs, the index found in the entries in MachineFrameInfo::CalleeSavedInfos
is not to be found in MachineFrameInfo::Objects
, and isDeadObjectIndex
asserts.
We should create proper (fixed?) slots in MFI in the future to avoid inconsistencies there, since we don't really care about the frame index to be fixed, but the location on the stack.