aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/ProcessImplicitDefs.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-07 00:32:25 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-07-07 00:32:25 +0000
commit205f02e47fa577e263b11fd132c36c378303b243 (patch)
tree79ffbfbecf7d39d3b8789af4953e194fe1c7963d /lib/CodeGen/ProcessImplicitDefs.cpp
parentc1c0833f5c20e2558f5767735b60fdae654f8fe2 (diff)
downloadexternal_llvm-205f02e47fa577e263b11fd132c36c378303b243.zip
external_llvm-205f02e47fa577e263b11fd132c36c378303b243.tar.gz
external_llvm-205f02e47fa577e263b11fd132c36c378303b243.tar.bz2
Revert "Remove references to INSERT_SUBREG after de-SSA" r107725.
Buildbot breakage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107744 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ProcessImplicitDefs.cpp')
-rw-r--r--lib/CodeGen/ProcessImplicitDefs.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/CodeGen/ProcessImplicitDefs.cpp b/lib/CodeGen/ProcessImplicitDefs.cpp
index 2caef08..80121ca 100644
--- a/lib/CodeGen/ProcessImplicitDefs.cpp
+++ b/lib/CodeGen/ProcessImplicitDefs.cpp
@@ -102,6 +102,21 @@ bool ProcessImplicitDefs::runOnMachineFunction(MachineFunction &fn) {
continue;
}
+ if (MI->isInsertSubreg()) {
+ MachineOperand &MO = MI->getOperand(2);
+ if (ImpDefRegs.count(MO.getReg())) {
+ // %reg1032<def> = INSERT_SUBREG %reg1032, undef, 2
+ // This is an identity copy, eliminate it now.
+ if (MO.isKill()) {
+ LiveVariables::VarInfo& vi = lv_->getVarInfo(MO.getReg());
+ vi.removeKill(MI);
+ }
+ MI->eraseFromParent();
+ Changed = true;
+ continue;
+ }
+ }
+
// Eliminate %reg1032:sub<def> = COPY undef.
if (MI->isCopy() && MI->getOperand(0).getSubReg()) {
MachineOperand &MO = MI->getOperand(1);