[llvm-bugs] [Bug 28524] New: Assertion failed: (Bits != 0 && "Cannot print this instruction.") for patchable functions

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 12 09:43:04 PDT 2016


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

            Bug ID: 28524
           Summary: Assertion failed: (Bits != 0 && "Cannot print this
                    instruction.") for patchable functions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: igor at azulsystems.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16731
  --> https://llvm.org/bugs/attachment.cgi?id=16731&action=edit
test case

$ llvm/buildDA/bin/llc -O3 test.ll
Assertion failed: (Bits != 0 && "Cannot print this instruction."), function
printInstruction, file llvm/buildDA/lib/Target/X86/X86GenAsmWriter.inc, line
46606.
Stack dump:
0.    Program arguments: llvm/buildDA/bin/llc -O3 tmp.ll
1.    Running pass 'Function Pass Manager' on module 'tmp.ll'.
2.    Running pass 'X86 Assembly / Object Emitter' on function '@test'


Problem happens when we are trying to print "PATCHABLE_OP 2, KILL, <ops...>"
"X86AsmPrinter::LowerPATCHABLE_OP" can't handle target independent opcodes.

Problematic instruction is generated from PatchableFunction.cpp. It looks for
the first instruction which in this case turns out to be KILL. I suspect that
http://reviews.llvm.org/rL274952 is indirectly responsible for such behaviour.

-- 
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/20160712/64c25fab/attachment.html>


More information about the llvm-bugs mailing list