Tighten up an internal LSR API that should check for NULL.

No test case, but should fix a scan_build warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177374 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2013-03-19 04:14:57 +00:00
parent 5d22d02fac
commit 4b02729558

View File

@ -895,7 +895,7 @@ void Cost::RatePrimaryRegister(const SCEV *Reg,
}
if (Regs.insert(Reg)) {
RateRegister(Reg, Regs, L, SE, DT);
if (isLoser())
if (LoserRegs && isLoser())
LoserRegs->insert(Reg);
}
}