[llvm-bugs] [Bug 47945] New: opt -sroa causes "PHI node has multiple entries for the same basic block with different incoming values!"

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 22 08:10:26 PDT 2020


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

            Bug ID: 47945
           Summary: opt -sroa causes "PHI node has multiple entries for
                    the same basic block with different incoming values!"
           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 24093
  --> https://bugs.llvm.org/attachment.cgi?id=24093&action=edit
bbi-30982_2.ll reproducer

Reproduce with:
 opt -S -o - bbi-30982_2.ll -sroa

Result:

PHI node has multiple entries for the same basic block with different incoming
values!
  %.pre-phi1.sroa.phi = phi i16* [ %s1.i.sroa.1.sroa.0.0.gep.sroa_cast2,
%land.lhs.true.i ], [ %s1.i.sroa.1.sroa.0.0.gep1.sroa_cast3, %land.lhs.true.i ]
label %land.lhs.true.i
  %s1.i.sroa.1.sroa.0.0.gep1.sroa_cast3 = bitcast i8* %s1.i.sroa.1.sroa.0 to
i16*
  %s1.i.sroa.1.sroa.0.0.gep.sroa_cast2 = bitcast i8* %s1.i.sroa.1.sroa.0 to
i16*
in function h
LLVM ERROR: Broken function found, compilation aborted!

Starts happening with 745c6c8458ba:

    Process gep (phi ptr1, ptr2) in SROA

    Differential Revision: https://reviews.llvm.org/D79218

-- 
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/20201022/2d8d2df9/attachment.html>


More information about the llvm-bugs mailing list