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: unassignedb...@nondot.org
          Reporter: mikael.hol...@ericsson.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to