summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-29 21:00:03 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-29 21:00:03 +0000
commit3e3cdecf98e5a5a2ef1296f96c52da4b435dd950 (patch)
treed267db580bb9d8a9189d54288dddd10cc62f5252 /llvm/lib/CodeGen
parentda9ea1d6bc468127b72edef85552b57eac58d99d (diff)
downloadbcm5719-llvm-3e3cdecf98e5a5a2ef1296f96c52da4b435dd950.tar.gz
bcm5719-llvm-3e3cdecf98e5a5a2ef1296f96c52da4b435dd950.zip
Clear kill flags in InstrEmitter::EmitSubregNode().
When a local virtual register is made global, make sure to clear any existing kill flags. llvm-svn: 159461
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index a57d47ffb39..f154271894f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -470,6 +470,7 @@ void InstrEmitter::EmitSubregNode(SDNode *Node,
VRBase = MRI->createVirtualRegister(TRC);
BuildMI(*MBB, InsertPos, Node->getDebugLoc(),
TII->get(TargetOpcode::COPY), VRBase).addReg(SrcReg);
+ MRI->clearKillFlags(SrcReg);
} else {
// VReg may not support a SubIdx sub-register, and we may need to
// constrain its register class or issue a COPY to a compatible register
OpenPOWER on IntegriCloud