Skip to content

two passes of simplifycfg needed to simplify code #2158

@llvmbot

Description

@llvmbot
Bugzilla Link 1786
Resolution FIXED
Resolved on Apr 24, 2010 07:06
Version 2.0
OS Linux
Attachments bitcode for test case
Reporter LLVM Bugzilla Contributor
CC @jayfoad,@nlewycky

Extended Description

I run this on the attached bitcode file pre.bc:

$ opt -f -o post.bc pre.bc -simplifycfg

Then in post.bc, basic block bb17 is only reachable from cond_next27, and cond_next27 is only reachable from bb17. Neither is reachable from the entry block so they should have been removed.

Running "opt ... -simplifycfg -simplifycfg" still doesn't remove them, but I guess that's because the pass manager still only runs the pass once, or something.

If I run simplifycfg again on post.bc, they do get removed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions