Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

SimplifyCFG does not eliminate phi nodes with one predecessor #5345

Open Quuxplusone opened 15 years ago

Quuxplusone commented 15 years ago
Bugzilla Link PR4839
Status NEW
Importance P normal
Reported by Andre Tavares (andrelct@dcc.ufmg.br)
Reported on 2009-08-31 08:15:44 -0700
Last modified on 2010-03-06 14:00:53 -0800
Version 2.5
Hardware PC Linux
CC clattner@nondot.org, llvm-bugs@lists.llvm.org, resistor@mac.com
Fixed by commit(s)
Attachments x.bc (284 bytes, application/octet-stream)
SimplifyCFG.patch (1094 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 3396
Test case

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.
Quuxplusone commented 15 years ago

Attached x.bc (284 bytes, application/octet-stream): Test case

Quuxplusone commented 15 years ago

Attached SimplifyCFG.patch (1094 bytes, text/plain): Patch to solve the bug

Quuxplusone commented 15 years ago

I'm fine with adding this to simplifycfg in principle, but simplifycfg cannot break LCSSA.