[llvm] [AMDGPU] Only src0 and mandatory literals can use literal64 (PR #196456)
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 01:14:35 PDT 2026
rampitec wrote:
> The still remaining problem:
>
> ```
> llvm-mc -arch=amdgcn -mcpu=gfx1250 -show-encoding <<< 'v_add_f64 v[0:1], v[0:1], lit(1)'
> v_add_f64_e64 v[0:1], v[0:1], lit(0x1) ; encoding: [0x00,0x00,0x02,0xd5,0x00,0xfd,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
> ```
>
> @kosarev could you please take a look? That shall use lit32 I believe, no reason to force lit64, it was not requested. And then it is simply illegal. I.e., literal can be represented as 32-bit. If it is not then we shall issue an error here.
I.e. for that one I think we shall have 0xff in the encoding field and 32-bit literal.
https://github.com/llvm/llvm-project/pull/196456
More information about the llvm-commits
mailing list