[llvm-bugs] [Bug 27660] New: phi node arguments oscillate with passes jump-threading and loop-simplify

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 5 16:58:03 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27660

            Bug ID: 27660
           Summary: phi node arguments oscillate with passes
                    jump-threading and loop-simplify
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: nwilson20 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16313
  --> https://llvm.org/bugs/attachment.cgi?id=16313&action=edit
jump-threading_loop-simplify.ll

When using the flags -jump-threading and -loop-simplify on the attached IR
(jump-threading_loop-simplify.ll) the phi nodes will keep flipping. This was
produced by using the attached IR and using the output as input back to opt.

For example:
$ ./opt -S -jump-threading -loop-simplify jump-threading_loop-simplify.ll >
out1.ll
$ ./opt -S -jump-threading -loop-simplify out1.ll > out2.ll
$ ./opt -S -jump-threading -loop-simplify out2.ll > out3.ll


diff out2.ll out1.ll
1c1
< ; ModuleID = 'out1.ll'
---
> ; ModuleID = 'jump-threading_loop-simplify.ll'
29,30c29,30
< _ZNK4pugi8xml_text5_dataEv.exit.loopexit:         ; preds = %for.inc.i,
%for.body.i
<   %.ph = phi %"struct.pugi::xml_node_struct.1.85.421"* [ null, %for.inc.i ],
[ undef, %for.body.i ]
---
> _ZNK4pugi8xml_text5_dataEv.exit.loopexit:         ; preds = %for.body.i, %for.inc.i
>   %.ph = phi %"struct.pugi::xml_node_struct.1.85.421"* [ undef, %for.body.i ], [ null, %for.inc.i ]


$ diff out3.ll out2.ll
1c1
< ; ModuleID = 'out2.ll'
---
> ; ModuleID = 'out1.ll'
30c30
<   %.ph = phi %"struct.pugi::xml_node_struct.1.85.421"* [ undef, %for.body.i
], [ null, %for.inc.i ]
---
>   %.ph = phi %"struct.pugi::xml_node_struct.1.85.421"* [ null, %for.inc.i ], [ undef, %for.body.i ]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160505/7f002ac5/attachment.html>


More information about the llvm-bugs mailing list