[TypePromotion] Use return value from SmallPtrSet::insert to avoid a call to SmallPtrSet::count. NFC (#103008)
This commit is contained in:
parent
b1aa0b0b88
commit
dbe8a10c06
@ -834,11 +834,10 @@ bool TypePromotionImpl::TryToPromote(Value *V, unsigned PromotedWidth,
|
||||
// the tree has already been explored.
|
||||
// TODO: This could limit the transform, ie if we try to promote something
|
||||
// from an i8 and fail first, before trying an i16.
|
||||
if (AllVisited.count(V))
|
||||
if (!AllVisited.insert(V).second)
|
||||
return false;
|
||||
|
||||
CurrentVisited.insert(V);
|
||||
AllVisited.insert(V);
|
||||
|
||||
// Calls can be both sources and sinks.
|
||||
if (isSink(V))
|
||||
|
Loading…
x
Reference in New Issue
Block a user