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

No test case, but should fix a scan_build warning.

llvm-svn: 177374
This commit is contained in:
Andrew Trick 2013-03-19 04:14:57 +00:00
parent 9be9d172bf
commit a1c01ba8c7
1 changed files with 1 additions and 1 deletions

View File

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