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

           Summary: "undef" in conditional branches may lead to assertion
                    failure
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=6029)
 --> (http://llvm.org/bugs/attachment.cgi?id=6029)
Patch to fix   "undef" in conditional branches may lead to assertion failure

There seems to be an issue with the removal of dead blocks in SCCP.cpp.

Given a branch/switch instruction with "undef" condition, SCCP takes the first
available successor in the list as arbitrary target.

In cases where this very target will be removed, an alternate (arbitrary)
target should be chosen. Otherwise, this would lead to an assertion to fail
later on. 

Please see the patch for exact code positions.
Patch fixes the problem, needs review.

Thanks.

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to