2009/8/28 Andre Tavares <andrelct at dcc.ufmg.br>
> Hello,
>
> in the description of SimplifyCFG, it says that it can "Eliminates PHI
> nodes for basic blocks with a single predecessor."
>
> I tested this pass with a program that has phi nodes with a single
> predecessor and it did not remove it. I also looked in the code and found
> nothing to remove it. I'm I missing something, or it does not remove
phis
> with a single predecessor?
This is probably better discussed in a bug report. I only took a brief look,
but it looks like the problem is triggered by the CFG being diamond-shaped.
The attached x.bc is a simpler testcase that also demonstrates the
missed-optimization.
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20090828/464136f0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x.bc
Type: application/octet-stream
Size: 284 bytes
Desc: not available
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20090828/464136f0/attachment.obj>