[llvm-dev] ScalarEvolution invariants around wrapping flags

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Sun Sep 29 11:22:52 PDT 2019


Your reasoning sounds correct to me.  Let's revert for now?

I don't think there is an easy fix, we'll have to do a global "must be
executed" analysis to reapply the patch soundly.  And that's difficult
since any external functional call can call "exit(0)".

-- Sanjoy

On Thu, Sep 26, 2019 at 6:19 AM Tim Northover <t.p.northover at gmail.com> wrote:
>
> Thanks for the information everyone, it's clarified my thinking
> significantly. With that better understanding I've tracked the problem
> I'm seeing down to r366419 (https://reviews.llvm.org/D64868), which
> got committed in July.
>
> To me it looks like the patch is invalid because isAddRecNeverPoison
> is a loop-relative computation. To add the flags to the increment we'd
> need to know that the loop is guaranteed to execute at least once,
> which doesn't really have a query available.
>
> Does that sound right? And if so should we revert it or try to
> incorporate a loop-executed check? I probably tend towards revert.
>
> Cheers.
>
> Tim.


More information about the llvm-dev mailing list