For unreachable loops, any BECount is legal, and since D98706 SCEV can make use of this for loops that are unreachable due to constant branches. To avoid false positives, adjust SCEV verification to only check BECounts in reachable loops.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/ScalarEvolution.cpp | ||
---|---|---|
13465 | Why not just use DT->isReachableFromEntry(L->getHeader())? |
llvm/lib/Analysis/ScalarEvolution.cpp | ||
---|---|---|
13465 | The problematic case is br i1 false style branches, for which you added special handling in isImpliedCond(). The blocks are reachable in the DT, which does not special-case constant branch conditions. |
llvm/test/Transforms/IndVarSimplify/X86/pr35406.ll | ||
---|---|---|
2 | Can we do both command lines for old & new PM? |
Why not just use DT->isReachableFromEntry(L->getHeader())?