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

            Bug ID: 45302
           Summary: llc: ../lib/CodeGen/IfConversion.cpp:2056: [...]
                    Assertion `(TailBB || !TrueBBI.IsBrAnalyzable) &&
                    "Unexpected!"' failed.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedb...@nondot.org
          Reporter: mikael.hol...@ericsson.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 23278
  --> https://bugs.llvm.org/attachment.cgi?id=23278&action=edit
bbi-40556_arm.mir reproducer.

Reproduce with:
 llc -mtriple=thumbv7-apple-ios -o /dev/null bbi-40556_arm.mir -run-pass
if-converter

which results in

llc: ../lib/CodeGen/IfConversion.cpp:2056: bool (anonymous
namespace)::IfConverter::IfConvertDiamond((anonymous
namespace)::IfConverter::BBInfo &, (anonymous
namespace)::IfConverter::IfcvtKind, unsigned int, unsigned int, bool, bool):
Assertion `(TailBB || !TrueBBI.IsBrAnalyzable) && "Unexpected!"' failed.

The reproducer is quite small:

--- |

  define void @func() minsize {
    ret void
  }

...
---
name:            func
body:             |
  bb.0:

    tBcc %bb.3, 1, $cpsr

  bb.1:

    tBcc %bb.2, 1, $cpsr
    tB %bb.2, 14, $noreg

  bb.2:

  bb.3:
  successors:
    tBX_RET 14, _
...

I assume the interesting part is the two branches from bb.1 to bb.2.

This started failing with 4f454b22754:
 [IfCvt][ARM] Optimise diamond if-conversion for code size

If revert that commit the crash goes away.

-- 
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