[llvm-dev] Dataflow analysis regression in 3.7
Daniel Berlin via llvm-dev
llvm-dev at lists.llvm.org
Fri Jul 7 09:37:29 PDT 2017
On Wed, Jul 5, 2017 at 3:59 PM, Johan Engelen via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi all,
> I just found an optimization regression regarding simple
> dataflow/constprop analysis:
> https://godbolt.org/g/Uz8P7t
>
> This code
> ```
> int dataflow(int b) {
> int a;
>
> if (b==4)
> a = 3*b; // fully optimized when changed to a = 3;
> else
> a = 5;
>
> if (a == 4)
> return 0;
> else
> return 1;
> }
> ```
> is no longer optimized to just a "return 1". The regression happened in
> LLVM 3.6 --> 3.7.
>
>
NewGVN should be able to do this at this point, but it's really a VRP
issue.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170707/a3a362f1/attachment.html>
More information about the llvm-dev
mailing list