summaryrefslogtreecommitdiff
path: root/lib/CodeGen/DeadMachineInstructionElim.cpp
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
commit6b88c180dad5eaa8361c5de2fa01c997f4f83368 (patch)
tree5fb1df731d6f22bc07870aa3f15d3e850532865d /lib/CodeGen/DeadMachineInstructionElim.cpp
parent4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 (diff)
downloadllvm-6b88c180dad5eaa8361c5de2fa01c997f4f83368.tar.gz
llvm-6b88c180dad5eaa8361c5de2fa01c997f4f83368.tar.bz2
llvm-6b88c180dad5eaa8361c5de2fa01c997f4f83368.tar.xz
Handle register masks in DeadMachineInstructionElim.
Don't track live physregs that are clobbered by a register mask operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DeadMachineInstructionElim.cpp')
-rw-r--r--lib/CodeGen/DeadMachineInstructionElim.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/DeadMachineInstructionElim.cpp b/lib/CodeGen/DeadMachineInstructionElim.cpp
index ba135e19f4..aeb0b3ed02 100644
--- a/lib/CodeGen/DeadMachineInstructionElim.cpp
+++ b/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