Skip to content

Commit 5bc36c8

Browse files
[X86] Add necessary check isReg() when updating LiveVariables in convertToThreeAddress
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D137388
1 parent 27091e6 commit 5bc36c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/X86/X86InstrInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ MachineInstr *X86InstrInfo::convertToThreeAddress(MachineInstr &MI,
17681768
if (LV) { // Update live variables
17691769
for (unsigned I = 0; I < NumRegOperands; ++I) {
17701770
MachineOperand &Op = MI.getOperand(I);
1771-
if (Op.isDead() || Op.isKill())
1771+
if (Op.isReg() && (Op.isDead() || Op.isKill()))
17721772
LV->replaceKillInstruction(Op.getReg(), MI, *NewMI);
17731773
}
17741774
}

0 commit comments

Comments
 (0)