Skip to content

Commit ab34c46

Browse files
author
git apple-llvm automerger
committed
Merge commit 'bd1559533d88' from llvm.org/main into next
2 parents 3bc7932 + bd15595 commit ab34c46

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/Utils/SimplifyIndVar.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,10 +1103,8 @@ class WidenIV {
11031103

11041104
void updatePostIncRangeInfo(Value *Def, Instruction *UseI, ConstantRange R) {
11051105
DefUserPair Key(Def, UseI);
1106-
auto It = PostIncRangeInfos.find(Key);
1107-
if (It == PostIncRangeInfos.end())
1108-
PostIncRangeInfos.insert({Key, R});
1109-
else
1106+
auto [It, Inserted] = PostIncRangeInfos.try_emplace(Key, R);
1107+
if (!Inserted)
11101108
It->second = R.intersectWith(It->second);
11111109
}
11121110

0 commit comments

Comments
 (0)