[LLVMbugs] [Bug 2563] New: SimplifyCFG is not collapsing unneeded switches

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jul 17 15:06:38 PDT 2008


http://llvm.org/bugs/show_bug.cgi?id=2563

           Summary: SimplifyCFG is not collapsing unneeded switches
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Scalar Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: resistor at mac.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1841)
 --> (http://llvm.org/bugs/attachment.cgi?id=1841)
Example bitcode

In the attached testcase, note the blocks:

bb4.i.i:                ; preds = %grad.exit21.i
        switch i32 %154, label %bb9.i.i [
                 i32 12, label %bb12.i.i
                 i32 14, label %bb12.i.i
        ]

bb9.i.i:                ; preds = %bb4.i.i
        br label %bb12.i.i

bb12.i.i:
 ...

The switch in bb4.i.i is unnecessary, as is bb9.i.i.  SimplifyCFG (or some
other pass) should simplify this away, but doesn't.  This idiom occurs multiple
times in this case, probably as a result of LICM.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list