[llvm-bugs] [Bug 51700] New: opt -passes='loop-bound-split' failing with "PHINode should have one entry for each predecessor of its parent basic block!"

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 1 00:10:43 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51700

            Bug ID: 51700
           Summary: opt -passes='loop-bound-split' failing with "PHINode
                    should have one entry for each predecessor of its
                    parent basic block!"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 25210
  --> https://bugs.llvm.org/attachment.cgi?id=25210&action=edit
bbi-59713.ll reproducer

llvm commit: d396d09fc2278bfe34b9db2ee27ecfd470149da8

Reproduce with:
 opt -passes='loop-bound-split' -S -o - bbi-59713.ll

Result:
PHINode should have one entry for each predecessor of its parent basic block!
  %call.lcssa.ph = phi i16 
PHI node entries do not match predecessors!
  %call.lcssa = phi i16 [ %call, %cond.end ], [ %call.lcssa.ph, %end.loopexit ]
label %cond.end
label %entry.split.split
LLVM ERROR: Broken module found, compilation aborted!

Looking att -print-after-all we see that loop-bound-split has created this
broken phi instruction:

end.loopexit:                                     ; preds = %cond.end.split
  %call.lcssa.ph = phi i16 

Note:
If we add e.g. -verify-each we actually get less information, because then we
only get
 LLVM ERROR: Broken module found, compilation aborted!
and not the error message about the broken PHI.

It was also a mess reducing the input because bugpoint kept crashing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210901/36e007cd/attachment.html>


More information about the llvm-bugs mailing list