[PATCH] D54128: Fix MachineInstr::findRegisterUseOperandIdx subreg checks
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 11:25:51 PST 2018
arsenm added inline comments.
================
Comment at: lib/CodeGen/MachineInstr.cpp:936
continue;
- if (MOReg == Reg || (TRI && TargetRegisterInfo::isPhysicalRegister(MOReg) &&
- TargetRegisterInfo::isPhysicalRegister(Reg) &&
- TRI->isSubRegister(MOReg, Reg)))
+ if (MOReg == Reg || (TRI && Reg && MOReg && TRI->regsOverlap(MOReg, Reg)))
if (!isKill || MO.isKill())
----------------
Why is TRI optional here? I would expect it to be mandatory if there is a physical register and assert
https://reviews.llvm.org/D54128
More information about the llvm-commits
mailing list