diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -2365,6 +2365,7 @@ "trying to erase instruction with users."); Pair.getFirst()->eraseFromParent(); } + assert(!verifyFunction(*F, &dbgs())); } void BoUpSLP::eraseInstructions(ArrayRef AV) { @@ -5743,7 +5744,6 @@ if (Changed) { R.optimizeGatherSequence(); LLVM_DEBUG(dbgs() << "SLP: vectorized \"" << F.getName() << "\"\n"); - LLVM_DEBUG(verifyFunction(F)); } return Changed; }