[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 20:14:36 PST 2022


mkazantsev added a comment.

In D139403#3978183 <https://reviews.llvm.org/D139403#3978183>, @nikic wrote:

> In D139403#3977959 <https://reviews.llvm.org/D139403#3977959>, @mkazantsev wrote:
>
>> I've added a test which I think should end up with umin_seq, but it's umin. I don't know why, maybe a bug?
>
> Indeed, we were missing a umin_seq when computing the symbolic max BE count. Fixed in https://github.com/llvm/llvm-project/commit/4d97a914d7aef6c95cd95669f99e5d32899e165a.
>
> However, this indicates that this test is still not covering the right code path: I think what you need is a nested `(A1 and A2) and (B1 and B2)` structure where we get symbolic counts `C1` and `C2` from the inner ands and then those get combined. That will give you the umin from the new code path.

Will do, but I don't quite get why. In my example, if `%start_1` is 0, we will bail on 1st exit and never use `%start_2`. So there is no UB if start_1 = 0 and start_2 = poison. As far as I understood what umin_seq is, it's trying to address exactly this case.


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

https://reviews.llvm.org/D139403



More information about the llvm-commits mailing list