[PATCH] D139403: [SCEV] Compute symbolic exit count for 'and' conditions

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 02:33:44 PST 2022


mkazantsev added inline comments.


================
Comment at: llvm/test/Analysis/ScalarEvolution/symbolic_max_exit_count.ll:227
   ret i32 -3
 }
 
----------------
nikic wrote:
> mkazantsev wrote:
> > nikic wrote:
> > > I'm missing a test for the case where we actually produce a umin_seq.
> > In fact we have it in `test/Analysis/ScalarEvolution/exit-count-select-safe.ll`. This patch preserves current behavior, however if I remove `/*IsSequential*/ true`, it changes. Is it enough or you want a new one specifically for this?
> If I understand correctly, the tests in exit-count-select-safe.ll cover the case where we have an exact (but umin_seq) exit count. I think it still makes sense to have a test for the case where we don't have an exact count, but do have a symbolic umin_seq count.
> 
> We probably also want to use umin or umin_seq depending on `isa<BinaryOperator>(ExitCond)`, same as is done for the ExactNotTaken case a few lines before the new code.
Good point, I'll try to wright such a test.


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

https://reviews.llvm.org/D139403



More information about the llvm-commits mailing list