Skip to content

Commit c9dfb07

Browse files
committed
Merge r64316 from mainline.
Don't try to set an EFLAGS operand to dead if no instruction was created. This fixes a bug introduced by r61215. llvm-svn: 64524
1 parent 8c4aa72 commit c9dfb07

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/lib/Target/X86/X86RegisterInfo.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,13 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
404404
}
405405
}
406406

407-
// The EFLAGS implicit def is dead.
408-
New->getOperand(3).setIsDead();
407+
if (New) {
408+
// The EFLAGS implicit def is dead.
409+
New->getOperand(3).setIsDead();
409410

410-
// Replace the pseudo instruction with a new instruction...
411-
if (New) MBB.insert(I, New);
411+
// Replace the pseudo instruction with a new instruction...
412+
MBB.insert(I, New);
413+
}
412414
}
413415
} else if (I->getOpcode() == getCallFrameDestroyOpcode()) {
414416
// If we are performing frame pointer elimination and if the callee pops

0 commit comments

Comments
 (0)