[llvm] [AMDGPU] Src1 of VOP3 DPP instructions can be SGPR on supported subtargets (PR #67461)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 02:56:36 PST 2024


jayfoad wrote:

@mbrkusanin @Sisyph it seems like this works for integer instructions:
```
$ llvm-mc -arch=amdgcn -mcpu=gfx1150 -show-encoding <<< "v_add_nc_u32_e64_dpp v5, v1, s3 quad_perm:[3,2,1,0]"
	.text
	v_add_nc_u32_e64_dpp v5, v1, s3 quad_perm:[3,2,1,0] row_mask:0xf bank_mask:0xf ; encoding: [0x05,0x00,0x25,0xd5,0xfa,0x06,0x00,0x00,0x01,0x1b,0x00,0xff]
```
but not for floating point:
```
$ llvm-mc -arch=amdgcn -mcpu=gfx1150 -show-encoding <<< "v_add_f32_e64_dpp v5, v1, s3 quad_perm:[3,2,1,0]"
	.text
<stdin>:1:27: error: invalid operand for instruction
v_add_f32_e64_dpp v5, v1, s3 quad_perm:[3,2,1,0]
                          ^
```
Is that a bug or is there some reason for it?

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


More information about the llvm-commits mailing list