Don't use operator[] here, because it's not desirable to insert a default

value if the search fails.

llvm-svn: 107368
This commit is contained in:
Dan Gohman 2010-07-01 01:33:21 +00:00
parent bb7ac52e02
commit 9576645a84
1 changed files with 5 additions and 2 deletions

View File

@ -6127,8 +6127,11 @@ SelectionDAGBuilder::HandlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB) {
}
Reg = RegOut;
} else {
Reg = FuncInfo.ValueMap[PHIOp];
if (Reg == 0) {
DenseMap<const Value *, unsigned>::iterator I =
FuncInfo.ValueMap.find(PHIOp);
if (I != FuncInfo.ValueMap.end())
Reg = I->second;
else {
assert(isa<AllocaInst>(PHIOp) &&
FuncInfo.StaticAllocaMap.count(cast<AllocaInst>(PHIOp)) &&
"Didn't codegen value into a register!??");