[llvm] [Transforms] Use SmallMapVector::contains (NFC) (PR #138645)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 6 00:18:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/138645.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Vectorize/LoopVectorize.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 2dca2b322ee82..19b46c7eb8b52 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5035,7 +5035,7 @@ LoopVectorizationCostModel::selectInterleaveCount(VPlan &Plan, ElementCount VF,
}
unsigned MaxLocalUsers = Pair.second;
unsigned LoopInvariantRegs = 0;
- if (R.LoopInvariantRegs.find(Pair.first) != R.LoopInvariantRegs.end())
+ if (R.LoopInvariantRegs.contains(Pair.first))
LoopInvariantRegs = R.LoopInvariantRegs[Pair.first];
unsigned TmpIC = llvm::bit_floor((TargetNumRegisters - LoopInvariantRegs) /
``````````
</details>
https://github.com/llvm/llvm-project/pull/138645
More information about the llvm-commits
mailing list