[LLVMbugs] [Bug 5980] New: Dangling PHI argument causing crashes

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Fri Jan 8 17:30:27 PST 2010


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

           Summary: Dangling PHI argument causing crashes
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: stoklund at 2pi.dk
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=4016)
 --> (http://llvm.org/bugs/attachment.cgi?id=4016)
Reduced test case

The attached test case causes ISel to produce a PHI instruction that refers to
an MBB not in the CFG

BB#11: derived from LLVM BB %bb886.i.preheader
    Predecessors according to CFG: BB#4 BB#25
        %reg1025<def> = PHI %reg1026, <BB#4>, %reg1024, <BB#25>, %reg1024,
<BB#22>
    Successors according to CFG: BB#12

This looks innocent, but when -pre-regalloc-taildup later deletes BB#22, we
have a dangling pointer. Thing get worse from there.

Reproducible with

llc -verify-machineinstrs bugpoint-reduced-simplified.ll
llc -pre-regalloc-taildup -tail-dup-verify bugpoint-reduced-simplified.ll
llc -pre-regalloc-taildup bugpoint-reduced-simplified.ll


-- 
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