[llvm-bugs] [Bug 45302] New: llc: ../lib/CodeGen/IfConversion.cpp:2056: [...] Assertion `(TailBB || !TrueBBI.IsBrAnalyzable) && "Unexpected!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 25 05:02:18 PDT 2020


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: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200325/71af6acc/attachment.html>


More information about the llvm-bugs mailing list