summaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocFast.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-11-06 22:52:42 +0000
committerChad Rosier <mcrosier@apple.com>2012-11-06 22:52:42 +0000
commit7979b24e5cd4a99db6af3fcd66d9f514f02d11db (patch)
treed03f33e1477ed275e2785ab4f22606fb983bd2ba /lib/CodeGen/RegAllocFast.cpp
parenta6fb97a49a2e6070c71d44a54c8c0c117b62255a (diff)
downloadllvm-7979b24e5cd4a99db6af3fcd66d9f514f02d11db.tar.gz
llvm-7979b24e5cd4a99db6af3fcd66d9f514f02d11db.tar.bz2
llvm-7979b24e5cd4a99db6af3fcd66d9f514f02d11db.tar.xz
[regallocfast] Make sure the MachineRegisterInfo is aware of clobbers from a
register masks. This is an obvious and necessary fix for a soon to be committed patch. No test case possible at this time. Reviewed by Jakob. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocFast.cpp')
-rw-r--r--lib/CodeGen/RegAllocFast.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/RegAllocFast.cpp b/lib/CodeGen/RegAllocFast.cpp
index e426fe23c0..88922169b3 100644
--- a/lib/CodeGen/RegAllocFast.cpp
+++ b/lib/CodeGen/RegAllocFast.cpp
@@ -956,6 +956,11 @@ void RAFast::AllocateBasicBlock() {
bool hasPhysDefs = false;
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
MachineOperand &MO = MI->getOperand(i);
+ // Make sure MRI knows about registers clobbered by regmasks.
+ if (MO.isRegMask()) {
+ MRI->addPhysRegsUsedFromRegMask(MO.getRegMask());
+ continue;
+ }
if (!MO.isReg()) continue;
unsigned Reg = MO.getReg();
if (!Reg) continue;