Skip to content

Conversation

@jayfoad
Copy link
Contributor

@jayfoad jayfoad commented May 19, 2025

Assert that the MCRegister passed into addLiveIn, removeLiveIn, isLiveIn
and computeRegisterLiveness is physical.

Assert that the MCRegister passed into addLiveIn, removeLiveIn, isLiveIn and computeRegisterLiveness is physical.
@jayfoad jayfoad requested review from RKSimon, topperc and vg0204 May 19, 2025 10:49
Comment on lines 506 to 507
if (Op.isReg() && Op.getReg() != MCRegister::NoRegister &&
MBB->isLiveIn(Op.getReg()))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not convinced this is the right place to do this. It avoids failures in a couple of MIR tests which have $noreg in the input:

Failed Tests (2): LLVM :: CodeGen/X86/callbr-asm-outputs-regallocfast.mir LLVM :: CodeGen/X86/regallocfast-callbr-asm-spills-after-reload.mir 
MFI->isSpillSlotObjectIndex(FI))
for (const auto &Op : MI.operands())
if (Op.isReg() && MBB->isLiveIn(Op.getReg()))
if (Op.isReg() && Op.getReg() != MCRegister::NoRegister &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Op.getReg() or Op.getReg().isValid()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants