[llvm-dev] Questions about jump threading optimization and what we can do

Karl Rehm via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 3 12:50:52 PST 2020


Hm. I assumed that JumpThreading would be the primary factor in optimizing
code like this. Guess not. I'll need to look into SimplifyCFG to see what
prevents it from doing the same thing to the other loop:
https://godbolt.org/z/F6NjdG

On Mon, Feb 3, 2020 at 3:09 PM Michael Kruse <llvmdev at meinersbur.de> wrote:

> I assumed the LLVM-IR behind the godbolt link represented the C code
> you used before.
>
> SimplifyCFG actually helps the loop being removed:
> https://godbolt.org/z/5v7SXh
>
> But this doesn't even involve JumpThreading.
>
> Michael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200203/a47f8e59/attachment.html>


More information about the llvm-dev mailing list