Skip to content

Commit 9f59e26

Browse files
committed
[MCP] Use MachineInstr::all_defs instead of MachineInstr::defs in hasOverlappingMultipleDef.
defs does not return the defs for inline assembly. We need to use all_defs to find them. Need to reduce a test case still. Fixes #86880.
1 parent cf5cd98 commit 9f59e26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/MachineCopyPropagation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ bool MachineCopyPropagation::hasImplicitOverlap(const MachineInstr &MI,
640640
/// The umull instruction is unpredictable unless RdHi and RdLo are different.
641641
bool MachineCopyPropagation::hasOverlappingMultipleDef(
642642
const MachineInstr &MI, const MachineOperand &MODef, Register Def) {
643-
for (const MachineOperand &MIDef : MI.defs()) {
643+
for (const MachineOperand &MIDef : MI.all_defs()) {
644644
if ((&MIDef != &MODef) && MIDef.isReg() &&
645645
TRI->regsOverlap(Def, MIDef.getReg()))
646646
return true;

0 commit comments

Comments
 (0)