[llvm-bugs] [Bug 27665] New: phi node arguments oscillate with passes licm and simplifycfg

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 6 05:42:27 PDT 2016


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

            Bug ID: 27665
           Summary: phi node arguments oscillate with passes licm and
                    simplifycfg
           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 16316
  --> https://llvm.org/bugs/attachment.cgi?id=16316&action=edit
licm_simplifycfg.ll

When using the flags -licm and -simplifycfg on the attached IR
(licm_simplifycfg.ll) the phi node arguments will keep flipping. This was
produced by using the attached IR and using the output as input back to opt.

For example:
$ ~/install_dir/llvm/bin/opt -S -licm -simplifycfg licm_simplifycfg.ll >
out1.ll
$ ~/install_dir/llvm/bin/opt -S -licm -simplifycfg out1.ll > out2.ll
$ ~/install_dir/llvm/bin/opt -S -licm -simplifycfg out2.ll > out3.ll
$ ~/install_dir/llvm/bin/opt -S -licm -simplifycfg out3.ll > out4.ll


$ diff out2.ll out1.ll
1c1
< ; ModuleID = 'out1.ll'
---
> ; ModuleID = 'licm_simplifycfg.ll'
24c24
< land.rhs.i.i:                                     ; preds = %while.body.i.i1,
%land.rhs.i.i.preheader
---
> land.rhs.i.i:                                     ; preds = %land.rhs.i.i.preheader, %while.body.i.i1
34c34
<   %6 = phi i64 [ %1, %while.body.i.i.i ], [ %1, %land.rhs.i.i ], [ undef,
%while.body.i.i1 ]
---
>   %6 = phi i64 [ %1, %while.body.i.i.i ], [ undef, %while.body.i.i1 ], [ %1, %land.rhs.i.i ]



$ diff out3.ll out2.ll
1c1
< ; ModuleID = 'out2.ll'
---
> ; ModuleID = 'out1.ll'
34c34
<   %6 = phi i64 [ %1, %while.body.i.i.i ], [ undef, %while.body.i.i1 ], [ %1,
%land.rhs.i.i ]
---
>   %6 = phi i64 [ %1, %while.body.i.i.i ], [ %1, %land.rhs.i.i ], [ undef, %while.body.i.i1 ]



$ diff out4.ll out3.ll
1c1
< ; ModuleID = 'out3.ll'
---
> ; ModuleID = 'out2.ll'
34c34
<   %6 = phi i64 [ %1, %while.body.i.i.i ], [ %1, %land.rhs.i.i ], [ undef,
%while.body.i.i1 ]
---
>   %6 = phi i64 [ %1, %while.body.i.i.i ], [ undef, %while.body.i.i1 ], [ %1, %land.rhs.i.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/20160506/d5975db4/attachment-0001.html>


More information about the llvm-bugs mailing list