llvm-project/llvm/test/Transforms/LoopSimplify
Orlando Cazalet-Hyams 1251cac62a [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion
Summary:
Bug: https://bugs.llvm.org/show_bug.cgi?id=39024

The bug reports that a vectorized loop is stepped through 4 times and each step through the loop seemed to show a different path. I found two problems here:

A) An incorrect line number on a preheader block (for.body.preheader) instruction causes a step into the loop before it begins.
B) Instructions in the middle block have different line numbers which give the impression of another iteration.

In this patch I give all of the middle block instructions the line number of the scalar loop latch terminator branch. This seems to provide the smoothest debugging experience because the vectorized loops will always end on this line before dropping into the scalar loop. To solve problem A I have altered llvm::SplitBlockPredecessors to accommodate loop header blocks.

I have set up a separate review D61933 for a fix which is required for this patch.

Reviewers: samsonov, vsk, aprantl, probinson, anemet, hfinkel, jmorse

Reviewed By: hfinkel, jmorse

Subscribers: jmorse, javed.absar, eraman, kcc, bjope, jmellorcrummey, hfinkel, gbedwell, hiraditya, zzheng, llvm-commits

Tags: #llvm, #debug-info

Differential Revision: https://reviews.llvm.org/D60831

> llvm-svn: 363046

llvm-svn: 363786
2019-06-19 10:50:47 +00:00
..
2003-04-25-AssertFail.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2003-05-12-PreheaderExitOfChild.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2003-08-15-PreheadersFail.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2003-12-10-ExitBlocksProblem.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2004-02-05-DominatorInfoCorruption.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2004-03-15-IncorrectDomUpdate.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2004-04-01-IncorrectDomUpdate.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2004-04-12-LoopSimplify-SwitchBackedges.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2004-04-13-LoopSimplifyUpdateDomFrontier.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2007-10-28-InvokeCrash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2010-07-15-IncorrectDomFrontierUpdate.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2010-12-26-PHIInfiniteLoop.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2011-12-14-LandingpadHeader.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
2012-03-20-indirectbr.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
ashr-crash.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
basictest.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
dbg-loc.ll [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-19 10:50:47 +00:00
do-preheader-dbg.ll [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-19 10:50:47 +00:00
dup-preds.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
for-preheader-dbg.ll [DebugInfo@O2][LoopVectorize] pr39024: Vectorized code linenos step through loop even after completion 2019-06-19 10:50:47 +00:00
hardertest.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
indirectbr-backedge.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
indirectbr.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
merge-exits.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
notify-scev.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
phi-node-simplify.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr26682.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr28272.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr30454.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
pr33494.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
preserve-llvm-loop-metadata.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
preserve-scev.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
single-backedge.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
unreachable-loop-pred.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00