summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
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
commit8ccaad526abdf39141b11b6d480b027d73a2d2a8 (patch)
treece07292c963954279676172c66209af9f010ae8a /lib/CodeGen/SelectionDAG/InstrEmitter.cpp
parentbb0721680c329625f47c090f48dcafb2fe14101c (diff)
downloadllvm-8ccaad526abdf39141b11b6d480b027d73a2d2a8.tar.gz
llvm-8ccaad526abdf39141b11b6d480b027d73a2d2a8.tar.bz2
llvm-8ccaad526abdf39141b11b6d480b027d73a2d2a8.tar.xz
Clear kill flags in InstrEmitter::EmitSubregNode().
When a local virtual register is made global, make sure to clear any existing kill flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/InstrEmitter.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/InstrEmitter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index a57d47ffb3..f154271894 100644
--- a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/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