Skip to content

Commit 9128077

Browse files
[Scalar] Avoid repeated hash lookups (NFC) (#112486)
1 parent 0a20ab9 commit 9128077

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/Float2Int.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,9 @@ bool Float2IntPass::validateAndTransform(const DataLayout &DL) {
398398
}
399399

400400
Value *Float2IntPass::convert(Instruction *I, Type *ToTy) {
401-
if (ConvertedInsts.contains(I))
401+
if (auto It = ConvertedInsts.find(I); It != ConvertedInsts.end())
402402
// Already converted this instruction.
403-
return ConvertedInsts[I];
403+
return It->second;
404404

405405
SmallVector<Value*,4> NewOperands;
406406
for (Value *V : I->operands()) {

0 commit comments

Comments
 (0)