[llvm-branch-commits] [llvm-branch] r110591 - in /llvm/branches/Apple/Pertwee: ./ lib/CodeGen/TwoAddressInstructionPass.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Aug 9 13:22:32 PDT 2010
Author: stoklund
Date: Mon Aug 9 15:22:32 2010
New Revision: 110591
URL: http://llvm.org/viewvc/llvm-project?rev=110591&view=rev
Log:
<rdar://problem/8287792>
$ svn merge -c 110589 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r110589 into '.':
U lib/CodeGen/TwoAddressInstructionPass.cpp
Modified:
llvm/branches/Apple/Pertwee/ (props changed)
llvm/branches/Apple/Pertwee/lib/CodeGen/TwoAddressInstructionPass.cpp
Propchange: llvm/branches/Apple/Pertwee/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 9 15:22:32 2010
@@ -1 +1 @@
-/llvm/trunk:109842,109879,110152,110170,110233,110248-110249,110254,110269,110279,110366
+/llvm/trunk:109842,109879,110152,110170,110233,110248-110249,110254,110269,110279,110366,110589
Modified: llvm/branches/Apple/Pertwee/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Pertwee/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=110591&r1=110590&r2=110591&view=diff
==============================================================================
--- llvm/branches/Apple/Pertwee/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/branches/Apple/Pertwee/lib/CodeGen/TwoAddressInstructionPass.cpp Mon Aug 9 15:22:32 2010
@@ -1446,7 +1446,17 @@
//
// If the REG_SEQUENCE doesn't kill its source, keeping live variables
// correctly up to date becomes very difficult. Insert a copy.
- //
+
+ // Defer any kill flag to the last operand using SrcReg. Otherwise, we
+ // might insert a COPY that uses SrcReg after is was killed.
+ if (isKill)
+ for (unsigned j = i + 2; j < e; j += 2)
+ if (MI->getOperand(j).getReg() == SrcReg) {
+ MI->getOperand(j).setIsKill();
+ isKill = false;
+ break;
+ }
+
MachineBasicBlock::iterator InsertLoc = MI;
MachineInstr *CopyMI = BuildMI(*MI->getParent(), InsertLoc,
MI->getDebugLoc(), TII->get(TargetOpcode::COPY))
More information about the llvm-branch-commits
mailing list