[llvm-bugs] [Bug 44209] New: opt -disable-basicaa -loop-versioning causes "PHINode should have one entry for each predecessor of its parent basic block!"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 3 04:27:34 PST 2019


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

            Bug ID: 44209
           Summary: opt -disable-basicaa -loop-versioning causes "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: Transformation Utilities
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

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

llvm version: 039664db8

Reproduce with:
 opt -disable-basicaa -loop-versioning bbi-36190.ll -S -o -

which gives

PHINode should have one entry for each predecessor of its parent basic block!
  %d.1.lcssa.lver.orig = phi i16 [ undef, %for.body.lver.orig ], [ undef,
%for.end ]
in function f
LLVM ERROR: Broken function found, compilation aborted!


The input contains three blocks that are not reachable from entry:

for.body3:                                        ; preds = %for.end
  br label %for.cond4

for.cond4:                                        ; preds = %for.cond4,
%for.body3
  br i1 undef, label %for.cond4, label %for.end

for.end:                                          ; preds = %for.cond4
  br i1 undef, label %for.body3, label %for.inc

Wouldn't be surprised if that is what is causing confusion.

-- 
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/20191203/2d3f1fcd/attachment.html>


More information about the llvm-bugs mailing list