[llvm-bugs] [Bug 27523] New: loop-unroll and simplifycfg cause oscillation with phi node arguments
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 25 16:54:48 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27523
Bug ID: 27523
Summary: loop-unroll and simplifycfg cause oscillation with phi
node arguments
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: nwilson20 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16269
--> https://llvm.org/bugs/attachment.cgi?id=16269&action=edit
scfg_loop_unroll.ll
When using the flags -simplifycfg and -loop-unroll on the attached IR
(scfg_loop_unroll.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 -simplifycfg -loop-unroll -S scfg_loop_unroll.ll > out1.ll
$ ./opt -simplifycfg -loop-unroll -S out1.ll > out2.ll
$./opt -simplifycfg -loop-unroll -S out2.ll > out3.ll
$diff out2.ll out1.ll
1c1
< ; ModuleID = 'out1.ll'
---
> ; ModuleID = 'simplifycfg_loop-unroll_osc.ll'
130c130
< %.ph = phi i32 [ %3, %if.then20 ], [ undef, %if.end27 ]
---
> %.ph = phi i32 [ undef, %if.end27 ], [ %3, %if.then20 ]
$diff out3.ll out2.ll
1c1
< ; ModuleID = 'out2.ll'
---
> ; ModuleID = 'out1.ll'
130c130
< %.ph = phi i32 [ undef, %if.end27 ], [ %3, %if.then20 ]
---
> %.ph = phi i32 [ %3, %if.then20 ], [ undef, %if.end27 ]
--
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/20160425/d3becf31/attachment.html>
More information about the llvm-bugs
mailing list