1// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefix=GFX9 %s
2// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck -check-prefix=NOVI --implicit-check-not=error: %s
3// RUN: not llvm-mc -arch=amdgcn -mcpu=hawaii %s 2>&1 | FileCheck -check-prefix=NOVI --implicit-check-not=error: %s
4// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck -check-prefix=NOVI --implicit-check-not=error: %s
5
6v_swap_b32 v1, v2
7// GFX9: v_swap_b32 v1, v2 ; encoding: [0x02,0xa3,0x02,0x7e]
8// NOVI: :1: error: instruction not supported on this GPU
9
10// FIXME: Error for it requiring VOP1 encoding
11v_swap_b32_e32 v1, v2
12// GFX9: v_swap_b32 v1, v2 ; encoding: [0x02,0xa3,0x02,0x7e]
13// NOVI: :1: error: instruction not supported on this GPU
14
15v_cvt_norm_i16_f16 v5, v1
16// GFX9: v_cvt_norm_i16_f16_e32 v5, v1 ; encoding: [0x01,0x9b,0x0a,0x7e]
17// NOVI: error: instruction not supported on this GPU
18
19v_cvt_norm_i16_f16 v5, -4.0
20// GFX9: v_cvt_norm_i16_f16_e32 v5, -4.0 ; encoding: [0xf7,0x9a,0x0a,0x7e]
21// NOVI: error: instruction not supported on this GPU
22
23v_cvt_norm_i16_f16 v5, 0xfe0b
24// GFX9: v_cvt_norm_i16_f16_e32 v5, 0xfe0b ; encoding: [0xff,0x9a,0x0a,0x7e,0x0b,0xfe,0x00,0x00]
25// NOVI: error: instruction not supported on this GPU
26
27v_cvt_norm_u16_f16 v5, s101
28// GFX9: v_cvt_norm_u16_f16_e32 v5, s101 ; encoding: [0x65,0x9c,0x0a,0x7e]
29// NOVI: error: instruction not supported on this GPU
30
31v_sat_pk_u8_i16 v255, v1
32// GFX9: v_sat_pk_u8_i16_e32 v255, v1 ; encoding: [0x01,0x9f,0xfe,0x7f]
33// NOVI: error: instruction not supported on this GPU
34
35v_sat_pk_u8_i16 v5, -1
36// GFX9: v_sat_pk_u8_i16_e32 v5, -1 ; encoding: [0xc1,0x9e,0x0a,0x7e]
37// NOVI: error: instruction not supported on this GPU
38
39v_sat_pk_u8_i16 v5, 0x3f717273
40// GFX9: v_sat_pk_u8_i16_e32 v5, 0x3f717273 ; encoding: [0xff,0x9e,0x0a,0x7e,0x73,0x72,0x71,0x3f]
41// NOVI: error: instruction not supported on this GPU
42
43v_screen_partition_4se_b32 v5, v255
44// GFX9: v_screen_partition_4se_b32_e32 v5, v255 ; encoding: [0xff,0x6f,0x0a,0x7e]
45// NOVI: :1: error: instruction not supported on this GPU
46
47v_screen_partition_4se_b32 v5, s101
48// GFX9: v_screen_partition_4se_b32_e32 v5, s101 ; encoding: [0x65,0x6e,0x0a,0x7e]
49// NOVI: :1: error: instruction not supported on this GPU
50
51v_screen_partition_4se_b32 v5, -1
52// GFX9: v_screen_partition_4se_b32_e32 v5, -1 ; encoding: [0xc1,0x6e,0x0a,0x7e]
53// NOVI: :1: error: instruction not supported on this GPU
54
55v_screen_partition_4se_b32 v5, 0x3f717273
56// GFX9: v_screen_partition_4se_b32_e32 v5, 0x3f717273 ; encoding: [0xff,0x6e,0x0a,0x7e,0x73,0x72,0x71,0x3f]
57// NOVI: :1: error: instruction not supported on this GPU
58