[llvm] [AMDGPU] Add lit() asm operand modifier for SP3 compatibility. (PR #68839)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 00:25:22 PDT 2023


jayfoad wrote:

> > Does your implementation accept `lit(abs(123.0))`? Does SP3 accept that?
> 
> This does not support it:
> 
> ```
> llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding  <<< 'v_sqrt_f32 v2, lit(abs(123.0))'
> 	.text
> <stdin>:1:20: error: failed parsing operand.
> v_sqrt_f32 v2, lit(abs(123.0))
>                    ^
> ```

Good. I think the operand of lit() should just be a constant. It should not be allowed to include any other modifiers.

https://github.com/llvm/llvm-project/pull/68839


More information about the llvm-commits mailing list