Skip to content

Commit bc59b63

Browse files
[Vectorize] Avoid repeated hash lookups (NFC) (#107729)
1 parent 81ec7bd commit bc59b63

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,8 @@ bool VPlanVerifier::verifyVPBasicBlock(const VPBasicBlock *VPBB) {
177177
static bool hasDuplicates(const SmallVectorImpl<VPBlockBase *> &VPBlockVec) {
178178
SmallDenseSet<const VPBlockBase *, 8> VPBlockSet;
179179
for (const auto *Block : VPBlockVec) {
180-
if (VPBlockSet.count(Block))
180+
if (!VPBlockSet.insert(Block).second)
181181
return true;
182-
VPBlockSet.insert(Block);
183182
}
184183
return false;
185184
}

0 commit comments

Comments
 (0)