diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-05-11 00:20:03 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-05-11 00:20:03 +0000 |
commit | 31b9c44cc13bb686010cf6bfbeef8745c39939b9 (patch) | |
tree | e324cbea83348dae5ffa8c6f1915855ec7ec14d1 /lib/CodeGen/RegAllocFast.cpp | |
parent | 0bcccac50481921ab86dfdbaadec79f1db35c662 (diff) | |
download | external_llvm-31b9c44cc13bb686010cf6bfbeef8745c39939b9.zip external_llvm-31b9c44cc13bb686010cf6bfbeef8745c39939b9.tar.gz external_llvm-31b9c44cc13bb686010cf6bfbeef8745c39939b9.tar.bz2 |
It's not safe eliminate copies where src and dst have different sub-register indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocFast.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocFast.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocFast.cpp b/lib/CodeGen/RegAllocFast.cpp index 7eafbc8..ab5e103 100644 --- a/lib/CodeGen/RegAllocFast.cpp +++ b/lib/CodeGen/RegAllocFast.cpp @@ -583,7 +583,8 @@ void RAFast::AllocateBasicBlock(MachineBasicBlock &MBB) { unsigned SrcCopyPhysReg = 0U; bool isCopy = TII->isMoveInstr(*MI, SrcCopyReg, DstCopyReg, SrcCopySubReg, DstCopySubReg); - if (isCopy && TargetRegisterInfo::isVirtualRegister(SrcCopyReg)) + if (isCopy && SrcCopySubReg == 0 && DstCopySubReg == 0 && + TargetRegisterInfo::isVirtualRegister(SrcCopyReg)) SrcCopyPhysReg = getVirt2PhysRegMapSlot(SrcCopyReg); // Loop over the implicit uses, making sure they don't get reallocated. |