summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-20 22:27:09 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-01-20 22:27:09 +0000
commit58614f2f5a1fea4c7e07873dcf2310ffa578c714 (patch)
treee84eed1e573101e621d3975491973a3bb7126768 /llvm/lib/CodeGen
parent91398927287a19aef8c089d7682e3da0d5b236f2 (diff)
downloadbcm5719-llvm-58614f2f5a1fea4c7e07873dcf2310ffa578c714.tar.gz
bcm5719-llvm-58614f2f5a1fea4c7e07873dcf2310ffa578c714.zip
Handle register masks in DeadMachineInstructionElim.
Don't track live physregs that are clobbered by a register mask operand. llvm-svn: 148588
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/DeadMachineInstructionElim.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
index ba135e19f4d..aeb0b3ed022 100644
--- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
+++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
@@ -173,6 +173,13 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
*SubRegs; ++SubRegs)
LivePhysRegs.reset(*SubRegs);
}
+ } else if (MO.isRegMask()) {
+ // Register mask of preserved registers. All clobbers are dead.
+ if (const uint32_t *Mask = MO.getRegMask())
+ LivePhysRegs.clearBitsNotInMask(Mask);
+ else
+ LivePhysRegs.reset();
+ LivePhysRegs |= ReservedRegs;
}
}
// Record the physreg uses, after the defs, in case a physreg is
OpenPOWER on IntegriCloud