[llvm] r215343 - In LVI(Lazy Value Info), originally value on a BB can only be caculated once,

Hans Wennborg hans at chromium.org
Fri Nov 21 15:12:08 PST 2014


On Thu, Nov 20, 2014 at 7:51 PM, Pete Cooper <peter_cooper at apple.com> wrote:
> But something is going wrong. I'm attaching a reduction of the problem
> I saw. With your patch applied, using "clang -O2 /tmp/a.cc", the
> attached program goes into an infinite loop.
>
> Thanks!  I’ll take a look.

I've reduced it (at least a little..) into an IR test (attached). With
your patch applied, run through opt like so:

  $ opt -correlated-propagation /tmp/reduced.ll -S

Note how the definition of %i.1 changes from

  %i.1 = phi i32 [ %add, %for.body ], [ %i.07, %if.then ]

to

  %i.1 = phi i32 [ 2, %for.body ], [ 1, %if.then ]

which is not correct.

 - Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reduced.ll
Type: application/octet-stream
Size: 4790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141121/dcaf8841/attachment.obj>


More information about the llvm-commits mailing list