There was a bug in LoopBoundSplit pass. The pass should ignore phi node which is not scevable.
It fixes compiler crashes from 471.omnetpp with -O3 -flto on X86 when running the pass just before the vectorizer as below.
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index b07f966e3b7e..a3e3ed093ecb 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -1195,6 +1195,7 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, /// TODO: Should LTO cause any differences to this set of passes? void PassBuilder::addVectorPasses(OptimizationLevel Level, FunctionPassManager &FPM, bool IsLTO) { + FPM.addPass(createFunctionToLoopPassAdaptor(LoopBoundSplitPass())); FPM.addPass(LoopVectorizePass( LoopVectorizeOptions(!PTO.LoopInterleaving, !PTO.LoopVectorization)));