diff options
author | Owen Anderson <resistor@mac.com> | 2008-01-10 00:01:41 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-01-10 00:01:41 +0000 |
commit | 9c2efa8a8f961a3750cec21530a2681d25b3bd49 (patch) | |
tree | 015ac432fd8a723b714dc1b1c930adfafaff77e4 /lib/CodeGen/StrongPHIElimination.cpp | |
parent | 19107563af7568713193c60be24503446556bff2 (diff) |
Copies need to be inserted before the first terminator, not at the end of the block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/StrongPHIElimination.cpp')
-rw-r--r-- | lib/CodeGen/StrongPHIElimination.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp index f7e44dd2fc..da5170af63 100644 --- a/lib/CodeGen/StrongPHIElimination.cpp +++ b/lib/CodeGen/StrongPHIElimination.cpp @@ -613,7 +613,7 @@ void StrongPHIElimination::ScheduleCopies(MachineBasicBlock* MBB, } // Insert copy from map[curr.first] to curr.second - TII->copyRegToReg(*MBB, MBB->end(), curr.second, + TII->copyRegToReg(*MBB, MBB->getFirstTerminator(), curr.second, map[curr.first], RC, RC); map[curr.first] = curr.second; @@ -642,7 +642,7 @@ void StrongPHIElimination::ScheduleCopies(MachineBasicBlock* MBB, // Insert a copy from dest to a new temporary t at the end of b unsigned t = MF->getRegInfo().createVirtualRegister(RC); - TII->copyRegToReg(*MBB, MBB->end(), t, + TII->copyRegToReg(*MBB, MBB->getFirstTerminator(), t, curr.second, RC, RC); map[curr.second] = t; |