Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp =================================================================== --- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -10638,6 +10638,11 @@ if (!EnableVPlanNativePath) { PA.preserve(); PA.preserve(); + PA.preserve(); + +#ifdef EXPENSIVE_CHECKS + SE.verify(); +#endif } if (Result.MadeCFGChange) { Index: llvm/test/Transforms/LoopVectorize/novect-lcssa-cfg-invalidation.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/novect-lcssa-cfg-invalidation.ll +++ llvm/test/Transforms/LoopVectorize/novect-lcssa-cfg-invalidation.ll @@ -8,7 +8,7 @@ define i32 @novect(ptr %p) { ; CHECK: Running pass: LoopVectorizePass on novect -; CHECK: Invalidating analysis: ScalarEvolutionAnalysis on novect +; CHECK-NOT: Invalidating analysis: ScalarEvolutionAnalysis on novect ; CHECK-NOT: Invalidating analysis: BranchProbabilityAnalysis on novect ; CHECK-NOT: Invalidating analysis: BlockFrequencyAnalysis on novect ; CHECK: Invalidating analysis: DemandedBitsAnalysis on novect