[llvm-commits] [llvm] r139055 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Sep 2 16:52:49 PDT 2011
Author: stoklund
Date: Fri Sep 2 18:52:49 2011
New Revision: 139055
URL: http://llvm.org/viewvc/llvm-project?rev=139055&view=rev
Log:
Use existing function.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=139055&r1=139054&r2=139055&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Sep 2 18:52:49 2011
@@ -11633,13 +11633,9 @@
// If the EFLAGS register isn't dead in the terminator, then claim that it's
// live into the sink and copy blocks.
- for (unsigned I = 0, E = MI->getNumOperands(); I != E; ++I) {
- const MachineOperand &MO = MI->getOperand(I);
- if (!MO.isReg() || !MO.isUse() || MO.isKill()) continue;
- unsigned Reg = MO.getReg();
- if (Reg != X86::EFLAGS) continue;
- copy0MBB->addLiveIn(Reg);
- sinkMBB->addLiveIn(Reg);
+ if (!MI->killsRegister(X86::EFLAGS)) {
+ copy0MBB->addLiveIn(X86::EFLAGS);
+ sinkMBB->addLiveIn(X86::EFLAGS);
}
// Transfer the remainder of BB and its successor edges to sinkMBB.
More information about the llvm-commits
mailing list