[LoadStoreVectorizer] Don't use a linear walk for an existence check in a SmallPtrSet

No functionality change intended.

llvm-svn: 277436
This commit is contained in:
Benjamin Kramer
2016-08-02 09:35:17 +00:00
parent f44b79d08e
commit a0053cc0af

View File

@@ -370,7 +370,7 @@ void Vectorizer::reorder(Instruction *I) {
// All instructions to move should follow I. Start from I, not from begin().
for (auto BBI = I->getIterator(), E = I->getParent()->end(); BBI != E;
++BBI) {
if (!is_contained(InstructionsToMove, &*BBI))
if (!InstructionsToMove.count(&*BBI))
continue;
Instruction *IM = &*BBI;
--BBI;