<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [AMDGPU][CODEGEN] Inline assembler cannot be used in bundles"
   href="https://bugs.llvm.org/show_bug.cgi?id=46285">46285</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[AMDGPU][CODEGEN] Inline assembler cannot be used in bundles
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: AMDGPU
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dpreobrazhensky@luxoft.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Lowering of inline assembly fails when used in bundles.

An example (test.ll):

    define amdgpu_kernel void @test_input_imm() {
      call void asm sideeffect "s_mov_b32 s0, $0", "i"(i32 42)
      call void asm sideeffect "s_mov_b64 s[0:1], $0", "i"(i64 42)
      ret void
    }

Compile using the following command:

    llc -march=amdgcn -mcpu=gfx900 -o - test.ll

This test fails compiling and results in llvm crash:

    llc: lib/Target/AMDGPU/AMDGPUGenAsmWriter.inc:32664: void
llvm::AMDGPUInstPrinter::printInstruction(const llvm::MCInst *, uint64_t, const
llvm::MCSubtargetInfo &, llvm::raw_ostream &): Assertion `Bits != 0 && "Cannot
print this instruction."' failed.

When this test is reduced to one inline assembler statement, it compiles w/o
any issues.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>