[DivRemPairs] Use DenseMapBase::find instead of operator[]. NFC
This commit is contained in:
parent
d78c4d9d00
commit
82420b4e49
|
|
@ -151,8 +151,8 @@ static DivRemWorklistTy getWorklist(Function &F) {
|
||||||
// rare than division.
|
// rare than division.
|
||||||
for (auto &RemPair : RemMap) {
|
for (auto &RemPair : RemMap) {
|
||||||
// Find the matching division instruction from the division map.
|
// Find the matching division instruction from the division map.
|
||||||
Instruction *DivInst = DivMap[RemPair.first];
|
auto It = DivMap.find(RemPair.first);
|
||||||
if (!DivInst)
|
if (It == DivMap.end())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// We have a matching pair of div/rem instructions.
|
// We have a matching pair of div/rem instructions.
|
||||||
|
|
@ -160,7 +160,7 @@ static DivRemWorklistTy getWorklist(Function &F) {
|
||||||
Instruction *RemInst = RemPair.second;
|
Instruction *RemInst = RemPair.second;
|
||||||
|
|
||||||
// Place it in the worklist.
|
// Place it in the worklist.
|
||||||
Worklist.emplace_back(DivInst, RemInst);
|
Worklist.emplace_back(It->second, RemInst);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Worklist;
|
return Worklist;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue