From: Chris Lattner Date: Sat, 27 Jun 2009 04:06:41 +0000 (+0000) Subject: When doing remat, don't consider uses of non-allocatable physregs. Patch X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1873d0c2257b18451c5bb35577f929d0723433a0;p=oota-llvm.git When doing remat, don't consider uses of non-allocatable physregs. Patch by Evan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74370 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index d6931df896d..21bb5dc0127 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -947,6 +947,10 @@ unsigned LiveIntervals::getReMatImplicitUse(const LiveInterval &li, unsigned Reg = MO.getReg(); if (Reg == 0 || Reg == li.reg) continue; + + if (TargetRegisterInfo::isPhysicalRegister(Reg) && + !allocatableRegs_[Reg]) + continue; // FIXME: For now, only remat MI with at most one register operand. assert(!RegOp && "Can't rematerialize instruction with multiple register operand!");