[PATCH] D103913: [LoopBoundSplit] Ignore phi node which is not scevable
JinGu Kang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 8 10:44:09 PDT 2021
jaykang10 created this revision.
jaykang10 added reviewers: mkazantsev, fhahn.
Herald added subscribers: pengfei, javed.absar, hiraditya.
jaykang10 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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)));
https://reviews.llvm.org/D103913
Files:
llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp
llvm/test/Transforms/LoopBoundSplit/loop-bound-split.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103913.350657.patch
Type: text/x-patch
Size: 4996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210608/0d48938f/attachment.bin>
More information about the llvm-commits
mailing list