[llvm-dev] [AMDGPU] AMDGPUAsmParser fails to parse several instructions

Matt Arsenault via llvm-dev llvm-dev at lists.llvm.org
Fri Oct 23 11:12:34 PDT 2015


> On Oct 23, 2015, at 3:36 AM, 李弘宇 via llvm-dev <llvm-dev at lists.llvm.org> wrote:

> The first line has the following error message:
> 
> sop1-playground.s:1:15: error: invalid immediate: only 32-bit values are legal
> s_mov_b32 s0, 0xfe5163ab

I’ve fixed this problem in  r251132.

> 
> The second line of the assembly has the assertion fail:
> 
> llvm-mc: /mnt/dm-0/codebase/Compilers/LLVM/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:184: void (anonymous namespace)::AMDGPUOperand::setModifiers(unsigned int): Assertion `isReg()' failed.
> 
> and reports that 0.5 is "error: invalid operand for instruction"
> 
> v_mad_f32 v9, 0.5, v5, -v8

There is a bug with operand parsing when you have immediate operands and source modifiers. I haven’t fixed this yet, but you can work around it for now by not using the source modifier.

-Matt


More information about the llvm-dev mailing list