From 8d2c22900659fbd7c0bfb71262161d2a4f10a480 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Tue, 6 Nov 2012 22:52:42 +0000 Subject: [PATCH] [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. llvm-svn: 167498 --- llvm/lib/CodeGen/RegAllocFast.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index e426fe2..8892216 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/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; -- 2.7.4