summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ProcessImplicitDefs.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-05-10 21:25:30 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-05-10 21:25:30 +0000
commit9cc9bfaf86510790c36198b033f241635614a8d0 (patch)
treeaeeebed4a859a4fc913ffc54e9b1298ebf673a07 /lib/CodeGen/ProcessImplicitDefs.cpp
parentfc6e6a9b3b2b2de7bee47d9dcbdfdc72ca7f5238 (diff)
downloadllvm-9cc9bfaf86510790c36198b033f241635614a8d0.tar.gz
llvm-9cc9bfaf86510790c36198b033f241635614a8d0.tar.bz2
llvm-9cc9bfaf86510790c36198b033f241635614a8d0.tar.xz
It's not safe to propagate implicit_def that defines part of a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ProcessImplicitDefs.cpp')
-rw-r--r--lib/CodeGen/ProcessImplicitDefs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/ProcessImplicitDefs.cpp b/lib/CodeGen/ProcessImplicitDefs.cpp
index d7179b3e59..75875d2835 100644
--- a/lib/CodeGen/ProcessImplicitDefs.cpp
+++ b/lib/CodeGen/ProcessImplicitDefs.cpp
@@ -89,6 +89,8 @@ bool ProcessImplicitDefs::runOnMachineFunction(MachineFunction &fn) {
MachineInstr *MI = &*I;
++I;
if (MI->isImplicitDef()) {
+ if (MI->getOperand(0).getSubReg())
+ continue;
unsigned Reg = MI->getOperand(0).getReg();
ImpDefRegs.insert(Reg);
if (TargetRegisterInfo::isPhysicalRegister(Reg)) {