diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-11-19 05:45:24 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-11-19 05:45:24 +0000 |
commit | e7fbdcdfc6b5e562d2741cceec8aee1bd3dd1c2d (patch) | |
tree | b3784feb448f27870d903e2c6d6bb0e74bc4c168 | |
parent | 528900d9a46cf4acde3a90494f286116159d5e59 (diff) |
Don't attempt trivial coalescing for sub-register copies.
Patch by Krister Wombell!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119791 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index c0720fe9d1..ac5143b7c6 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -466,6 +466,10 @@ unsigned RALinScan::attemptTrivialCoalescing(LiveInterval &cur, unsigned Reg) { CandReg = CopyMI->getOperand(0).getReg(); else return Reg; + + // If the target of the copy is a sub-register then don't coalesce. + if(CopyMI->getOperand(0).getSubReg()) + return Reg; } if (TargetRegisterInfo::isVirtualRegister(CandReg)) { |