summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegisterCoalescer.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-10-29 17:51:52 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-10-29 17:51:52 +0000
commit9a06696a77c26b4792c8845d7c09cf2459717aaf (patch)
treed9c7e0ab8f7e6bfe89b71e1dda7d6119378e9d1b /llvm/lib/CodeGen/RegisterCoalescer.cpp
parent0de4a1e4ae99d434804ed79bf8cf61b1236d9a57 (diff)
downloadbcm5719-llvm-9a06696a77c26b4792c8845d7c09cf2459717aaf.tar.gz
bcm5719-llvm-9a06696a77c26b4792c8845d7c09cf2459717aaf.zip
Completely disallow partial copies in adjustCopiesBackFrom().
Partial copies can show up even when CoalescerPair.isPartial() returns false. For example: %vreg24:dsub_0<def> = COPY %vreg31:dsub_0; QPR:%vreg24,%vreg31 Such a partial-partial copy is not good enough for the transformation adjustCopiesBackFrom() needs to do. llvm-svn: 166944
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 75920744782..ac0ed5f611f 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -430,7 +430,8 @@ bool RegisterCoalescer::adjustCopiesBackFrom(const CoalescerPair &CP,
// If AValNo is defined as a copy from IntB, we can potentially process this.
// Get the instruction that defines this value number.
MachineInstr *ACopyMI = LIS->getInstructionFromIndex(AValNo->def);
- if (!CP.isCoalescable(ACopyMI))
+ // Don't allow any partial copies, even if isCoalescable() allows them.
+ if (!CP.isCoalescable(ACopyMI) || !ACopyMI->isFullCopy())
return false;
// Get the LiveRange in IntB that this value number starts with.
OpenPOWER on IntegriCloud