[llvm] [MachineScheduler] Fix physreg dependencies of ExitSU (PR #123541)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 19 19:35:11 PST 2025
================
@@ -209,13 +209,17 @@ void ScheduleDAGInstrs::addSchedBarrierDeps() {
ExitSU.setInstr(ExitMI);
// Add dependencies on the defs and uses of the instruction.
if (ExitMI) {
+ const MCInstrDesc &MIDesc = ExitMI->getDesc();
for (const MachineOperand &MO : ExitMI->all_uses()) {
+ unsigned OpIdx = MO.getOperandNo();
Register Reg = MO.getReg();
if (Reg.isPhysical()) {
+ bool IsRealUse = OpIdx < MIDesc.getNumOperands() ||
+ MIDesc.hasImplicitUseOfPhysReg(Reg);
----------------
arsenm wrote:
MIDesc.hasImplicitUseOfPhysReg also looks buggy to me. It doesn't have the MCRI argument like hasImplicitDefOfPhysReg, so it will miss any aliases
https://github.com/llvm/llvm-project/pull/123541
More information about the llvm-commits
mailing list