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

            Bug ID: 46285
           Summary: [AMDGPU][CODEGEN] Inline assembler cannot be used in
                    bundles
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: AMDGPU
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to