diff --git a/llvm/test/MC/AMDGPU/gfx90a_asm_features.s b/llvm/test/MC/AMDGPU/gfx90a_asm_features.s --- a/llvm/test/MC/AMDGPU/gfx90a_asm_features.s +++ b/llvm/test/MC/AMDGPU/gfx90a_asm_features.s @@ -70,6 +70,10 @@ // GFX90A: v_pk_fma_f32 v[0:1], v[4:5], v[8:9], v[16:17] ; encoding: [0x00,0x40,0xb0,0xd3,0x04,0x11,0x42,0x1c] v_pk_fma_f32 v[0:1], v[4:5], v[8:9], v[16:17] +// NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU +// GFX90A: v_pk_fma_f32 v[0:1], v[2:3], v[4:5], 1.0 ; encoding: [0x00,0x40,0xb0,0xd3,0x02,0x09,0xca,0x1b] +v_pk_fma_f32 v[0:1], v[2:3], v[4:5], 1.0 + // NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU // GFX90A: v_pk_mul_f32 v[254:255], v[8:9], v[16:17] ; encoding: [0xfe,0x40,0xb1,0xd3,0x08,0x21,0x02,0x18] v_pk_mul_f32 v[254:255], v[8:9], v[16:17] @@ -182,6 +186,10 @@ // GFX90A: v_pk_mul_f32 v[4:5], v[8:9], v[16:17] clamp ; encoding: [0x04,0xc0,0xb1,0xd3,0x08,0x21,0x02,0x18] v_pk_mul_f32 v[4:5], v[8:9], v[16:17] clamp +// NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU +// GFX90A: v_pk_mul_f32 v[0:1], v[2:3], 1.0 ; encoding: [0x00,0x40,0xb1,0xd3,0x02,0xe5,0x01,0x18] +v_pk_mul_f32 v[0:1], v[2:3], 1.0 + // NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU // GFX90A: v_pk_add_f32 v[254:255], v[8:9], v[16:17] ; encoding: [0xfe,0x40,0xb2,0xd3,0x08,0x21,0x02,0x18] v_pk_add_f32 v[254:255], v[8:9], v[16:17] @@ -294,6 +302,10 @@ // GFX90A: v_pk_add_f32 v[4:5], v[8:9], v[16:17] clamp ; encoding: [0x04,0xc0,0xb2,0xd3,0x08,0x21,0x02,0x18] v_pk_add_f32 v[4:5], v[8:9], v[16:17] clamp +// NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU +// GFX90A: v_pk_add_f32 v[0:1], v[2:3], 1.0 ; encoding: [0x00,0x40,0xb2,0xd3,0x02,0xe5,0x01,0x18] +v_pk_add_f32 v[0:1], v[2:3], 1.0 + // NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU // GFX90A: v_pk_mov_b32 v[0:1], v[2:3], v[4:5] ; encoding: [0x00,0x40,0xb3,0xd3,0x02,0x09,0x02,0x18] v_pk_mov_b32 v[0:1], v[2:3], v[4:5] @@ -322,6 +334,14 @@ // GFX90A: v_pk_mov_b32 v[0:1], v[2:3], v[4:5] op_sel:[1,1] ; encoding: [0x00,0x58,0xb3,0xd3,0x02,0x09,0x02,0x18] v_pk_mov_b32 v[0:1], v[2:3], v[4:5] op_sel:[1,1] +// NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU +// GFX90A: v_pk_mov_b32 v[0:1], v[2:3], 4 ; encoding: [0x00,0x40,0xb3,0xd3,0x02,0x09,0x01,0x18] +v_pk_mov_b32 v[0:1], v[2:3], 4 + +// NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU +// GFX90A: v_pk_mov_b32 v[0:1], v[2:3], 2.0 ; encoding: [0x00,0x40,0xb3,0xd3,0x02,0xe9,0x01,0x18] +v_pk_mov_b32 v[0:1], v[2:3], 2.0 + // NOT-GFX90A: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU // GFX90A: buffer_wbl2 ; encoding: [0x00,0x00,0xa0,0xe0,0x00,0x00,0x00,0x00] buffer_wbl2 diff --git a/llvm/test/MC/Disassembler/AMDGPU/gfx90a_features.txt b/llvm/test/MC/Disassembler/AMDGPU/gfx90a_features.txt --- a/llvm/test/MC/Disassembler/AMDGPU/gfx90a_features.txt +++ b/llvm/test/MC/Disassembler/AMDGPU/gfx90a_features.txt @@ -51,6 +51,9 @@ # GFX90A: v_pk_fma_f32 v[0:1], v[4:5], v[8:9], v[16:17] ; encoding: [0x00,0x40,0xb0,0xd3,0x04,0x11,0x42,0x1c] 0x00,0x40,0xb0,0xd3,0x04,0x11,0x42,0x1c +# GFX90A: v_pk_fma_f32 v[0:1], v[2:3], v[4:5], 0 ; encoding: [0x00,0x40,0xb0,0xd3,0x02,0x09,0x02,0x1a] +0x00,0x40,0xb0,0xd3,0x02,0x09,0xca,0x1b + # GFX90A: v_pk_mul_f32 v[254:255], v[8:9], v[16:17] ; encoding: [0xfe,0x40,0xb1,0xd3,0x08,0x21,0x02,0x18] 0xfe,0x00,0xb1,0xd3,0x08,0x21,0x02,0x18 @@ -135,6 +138,9 @@ # GFX90A: v_pk_mul_f32 v[4:5], v[8:9], v[16:17] clamp ; encoding: [0x04,0xc0,0xb1,0xd3,0x08,0x21,0x02,0x18] 0x04,0x80,0xb1,0xd3,0x08,0x21,0x02,0x18 +# GFX90A: v_pk_mul_f32 v[0:1], v[2:3], 0 ; encoding: [0x00,0x40,0xb1,0xd3,0x02,0x01,0x01,0x18] +0x00,0x40,0xb1,0xd3,0x02,0xe5,0x01,0x18 + # GFX90A: v_pk_add_f32 v[254:255], v[8:9], v[16:17] ; encoding: [0xfe,0x40,0xb2,0xd3,0x08,0x21,0x02,0x18] 0xfe,0x00,0xb2,0xd3,0x08,0x21,0x02,0x18 @@ -219,6 +225,9 @@ # GFX90A: v_pk_add_f32 v[4:5], v[8:9], v[16:17] clamp ; encoding: [0x04,0xc0,0xb2,0xd3,0x08,0x21,0x02,0x18] 0x04,0x80,0xb2,0xd3,0x08,0x21,0x02,0x18 +# GFX90A: v_pk_add_f32 v[0:1], v[2:3], 0 ; encoding: [0x00,0x40,0xb2,0xd3,0x02,0x01,0x01,0x18] +0x00,0x40,0xb2,0xd3,0x02,0xe5,0x01,0x18 + # GFX90A: v_pk_mov_b32 v[0:1], v[2:3], v[4:5] ; encoding: [0x00,0x40,0xb3,0xd3,0x02,0x09,0x02,0x18] 0x00,0x00,0xb3,0xd3,0x02,0x09,0x02,0x18 @@ -240,6 +249,12 @@ # GFX90A: v_pk_mov_b32 v[0:1], v[2:3], v[4:5] op_sel:[1,1] ; encoding: [0x00,0x58,0xb3,0xd3,0x02,0x09,0x02,0x18] 0x00,0x18,0xb3,0xd3,0x02,0x09,0x02,0x18 +# GFX90A: v_pk_mov_b32 v[0:1], v[2:3], 4 ; encoding: [0x00,0x40,0xb3,0xd3,0x02,0x09,0x01,0x18] +0x00,0x40,0xb3,0xd3,0x02,0x09,0x01,0x18 + +# GFX90A: v_pk_mov_b32 v[0:1], v[2:3], 0 ; encoding: [0x00,0x40,0xb3,0xd3,0x02,0x01,0x01,0x18] +0x00,0x40,0xb3,0xd3,0x02,0xe9,0x01,0x18 + # GFX90A: buffer_wbl2 ; encoding: [0x00,0x00,0xa0,0xe0,0x00,0x00,0x00,0x00] 0x00,0x00,0xa0,0xe0,0x00,0x00,0x00,0x00