summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-06-18 23:10:20 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-06-18 23:10:20 +0000
commit678927e0b11a11c58afef2a3bb213c4f3cef3335 (patch)
tree77505f5b2b9ad3a74da4a1f8aaf50830000bb2ff /llvm/lib/CodeGen
parent2d51c7c5923c6cc6eab5e95c078cc4bfab5560a3 (diff)
downloadbcm5719-llvm-678927e0b11a11c58afef2a3bb213c4f3cef3335.tar.gz
bcm5719-llvm-678927e0b11a11c58afef2a3bb213c4f3cef3335.zip
Only run CoalesceExtSubRegs when we can expect LiveIntervalAnalysis to clean up
the inserted INSERT_SUBREGs after us. llvm-svn: 106345
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/TwoAddressInstructionPass.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
index 048b6698a73..14102d1f3dd 100644
--- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -1397,8 +1397,11 @@ bool TwoAddressInstructionPass::EliminateRegSequences() {
MI->eraseFromParent();
}
- // Try coalescing some EXTRACT_SUBREG instructions.
- CoalesceExtSubRegs(RealSrcs, DstReg);
+ // Try coalescing some EXTRACT_SUBREG instructions. This can create
+ // INSERT_SUBREG instructions that must have <undef> flags added by
+ // LiveIntervalAnalysis, so only run it when LiveVariables is available.
+ if (LV)
+ CoalesceExtSubRegs(RealSrcs, DstReg);
}
RegSequences.clear();
OpenPOWER on IntegriCloud