diff --git a/lib/Transforms/IPO/PassManagerBuilder.cpp b/lib/Transforms/IPO/PassManagerBuilder.cpp index 6355204a03e..5363c91cc84 100644 --- a/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -217,7 +217,7 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) { addExtensionsToPM(EP_ScalarOptimizerLate, MPM); if (!LateVectorize) { - if (SLPVectorize) + if (SLPVectorize && OptLevel > 2) MPM.add(createSLPVectorizerPass()); // Vectorize parallel scalar chains. if (BBVectorize) {