[llvm-bugs] [Bug 50874] New: [SelectionDAGBuilder] Bad machine code: MBB has duplicate entries in its successor list

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 25 16:39:39 PDT 2021


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

            Bug ID: 50874
           Summary: [SelectionDAGBuilder] Bad machine code: MBB has
                    duplicate entries in its successor list
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

int a;
volatile unsigned b;
short c;
long d;
void e() {
f:
  b;
g:
  if (a)
    ;
  else {
    int h;
    if (d)
      goto f;
    if (c)
      goto g;
  }
}
void main() {}

clang -O3 -march=arch13 -o a.out -w -mllvm -available-load-scan-limit=12 -mllvm
-disable-cgp-branch-opts -mllvm -verify-machineinstrs

# After Instruction Selection
*** Bad machine code: MBB has duplicate entries in its successor list. ***
- function:    e
- basic block: %bb.10 f (0x2aa456acfc8)

or with llc:

define void @e() {
bb:
  switch i32 undef, label %bb1 [
    i32 0, label %bb2
    i32 2, label %bb2
    i32 3, label %bb2
  ]

bb1:                                              ; preds = %bb
  br label %bb2

bb2:                                              ; preds = %bb1, %bb, %bb, %bb
  ret void
}

llc -mcpu=arch13 -O3 -disable-cgp-branch-opts -verify-machineinstrs 

*** Bad machine code: MBB has duplicate entries in its successor list. ***

-- 
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/20210625/12a6c553/attachment.html>


More information about the llvm-bugs mailing list