llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.71k stars 11.87k forks source link

[AMDGPU] Assembler cannot handle v_mad_u32_u24 with relocated operand #100075

Closed jayfoad closed 3 months ago

jayfoad commented 3 months ago

With this test case I get:

$ llc -mtriple=amdgcn -mcpu=gfx1100 r.txt -o - | llvm-mc -triple=amdgcn -mcpu=gfx1100
    .text
    .section    .AMDGPU.config,"",@progbits
    .long   47176
    .long   1613692928
    .long   47180
    .long   0
    .long   47200
    .long   0
    .long   4
    .long   0
    .long   8
    .long   0
    .text
    .globl  f
    .p2align    8
    .type   f,@function
f:
    v_dual_mov_b32 v1, 0 :: v_dual_and_b32 v0, 1, v0
    s_delay_alu instid0(VALU_DEP_1)
unhandled operand type
UNREACHABLE executed at /home/jayfoad2/git/llvm-project/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:8655!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.

The instruction it fails on is v_mad_u32_u24 v0, v0, 12, g0@abs32@lo

llvmbot commented 3 months ago

@llvm/issue-subscribers-backend-amdgpu

Author: Jay Foad (jayfoad)

With this [test case](https://github.com/user-attachments/files/16345638/r.txt) I get: ``` $ llc -mtriple=amdgcn -mcpu=gfx1100 r.txt -o - | llvm-mc -triple=amdgcn -mcpu=gfx1100 .text .section .AMDGPU.config,"",@progbits .long 47176 .long 1613692928 .long 47180 .long 0 .long 47200 .long 0 .long 4 .long 0 .long 8 .long 0 .text .globl f .p2align 8 .type f,@function f: v_dual_mov_b32 v1, 0 :: v_dual_and_b32 v0, 1, v0 s_delay_alu instid0(VALU_DEP_1) unhandled operand type UNREACHABLE executed at /home/jayfoad2/git/llvm-project/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:8655! PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. ``` The instruction it fails on is `v_mad_u32_u24 v0, v0, 12, g0@abs32@lo`
jayfoad commented 3 months ago