[PATCH] D92367: [SCEV] Fix incorrect exit count calculated in error scope

Mindong Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 22:08:57 PST 2020


mdchen added inline comments.


================
Comment at: llvm/test/Analysis/ScalarEvolution/incorrect-exit-count.ll:1
+; RUN: opt -analyze -scalar-evolution < %s | FileCheck %s
+
----------------
mkazantsev wrote:
> mdchen wrote:
> > mkazantsev wrote:
> > > Please commit this test separately using auto-generated checks from ` utils/update_analyze_test_checks.py`. If you are addressing some bug from bugs.llvm.com, better name the test after this bug (like prXXXXX.ll).
> > > 
> > > Then, apply your changes and re-run  utils/update_analyze_test_checks.py on it. The diff will show what your patch has changed.
> > > 
> > > This test is very big. You could also try to use bugpoint tool to reduce the test (see https://llvm.org/docs/Bugpoint.html), because now I cannot figure what's going on here. Both test reduction (if possible) and explanatory comments (which block/loop are causing the problem and why) would be extremely useful to understand your fix.
> > I tried `llvm-reduce` but the output was not desirable, will add necessary comments, thanks! In short, the bug is that when computing the exit count of an outerloop's exiting block, the current `computeLoadConstantCompareExitLimit` method may choose an addrec of its child loop, which is incorrect.
> Then at least do the first step: commit this test as is with auto-generated checks, and then rebase your patch on top of that to show what has changed.
Sorry, I don't understand well. Do you mean that I should separate it into two commits or only keep those changed checks? 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92367/new/

https://reviews.llvm.org/D92367



More information about the llvm-commits mailing list