• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefixes=GFX9 %s
2
3// RUN: not llvm-mc -arch=amdgcn -mcpu=fiji %s 2>&1 | FileCheck -check-prefixes=ERR-VI,ERR-SICIVI --implicit-check-not=error: %s
4// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck -check-prefixes=ERR-SICI,ERR-SICIVI --implicit-check-not=error: %s
5// FIXME: pre-gfx9 errors should be more useful
6
7
8v_add_u32 v1, v2, v3
9// GFX9: v_add_u32_e32 v1, v2, v3       ; encoding: [0x02,0x07,0x02,0x68]
10// ERR-SICI: error: instruction not supported on this GPU
11// ERR-VI: error: operands are not valid for this GPU or mode
12
13v_add_u32 v1, v2, s1
14// GFX9: v_add_u32_e64 v1, v2, s1        ; encoding: [0x01,0x00,0x34,0xd1,0x02,0x03,0x00,0x00]
15// ERR-SICI: error: instruction not supported on this GPU
16// ERR-VI: error: operands are not valid for this GPU or mode
17
18v_add_u32 v1, s1, v2
19// GFX9: v_add_u32_e32 v1, s1, v2        ; encoding: [0x01,0x04,0x02,0x68]
20// ERR-SICI: error: instruction not supported on this GPU
21// ERR-VI: error: operands are not valid for this GPU or mode
22
23v_add_u32 v1, 4.0, v2
24// GFX9: v_add_u32_e32 v1, 4.0, v2       ; encoding: [0xf6,0x04,0x02,0x68]
25// ERR-SICI: error: instruction not supported on this GPU
26// ERR-VI: error: operands are not valid for this GPU or mode
27
28v_add_u32 v1, v2, 4.0
29// GFX9: v_add_u32_e64 v1, v2, 4.0       ; encoding: [0x01,0x00,0x34,0xd1,0x02,0xed,0x01,0x00]
30// ERR-SICI: error: instruction not supported on this GPU
31// ERR-VI: error: operands are not valid for this GPU or mode
32
33v_add_u32_e32 v1, v2, v3
34// GFX9: v_add_u32_e32 v1, v2, v3        ; encoding: [0x02,0x07,0x02,0x68]
35// ERR-SICI: error: instruction not supported on this GPU
36// ERR-VI: error: operands are not valid for this GPU or mode
37
38v_add_u32_e32 v1, s1, v3
39// GFX9: v_add_u32_e32 v1, s1, v3        ; encoding: [0x01,0x06,0x02,0x68]
40// ERR-SICI: error: instruction not supported on this GPU
41// ERR-VI: error: operands are not valid for this GPU or mode
42
43
44
45v_sub_u32 v1, v2, v3
46// GFX9: v_sub_u32_e32 v1, v2, v3        ; encoding: [0x02,0x07,0x02,0x6a]
47// ERR-SICI: error: instruction not supported on this GPU
48// ERR-VI: error: operands are not valid for this GPU or mode
49
50v_sub_u32 v1, v2, s1
51// GFX9: v_sub_u32_e64 v1, v2, s1        ; encoding: [0x01,0x00,0x35,0xd1,0x02,0x03,0x00,0x00]
52// ERR-SICI: error: instruction not supported on this GPU
53// ERR-VI: error: operands are not valid for this GPU or mode
54
55v_sub_u32 v1, s1, v2
56// GFX9: v_sub_u32_e32 v1, s1, v2        ; encoding: [0x01,0x04,0x02,0x6a]
57// ERR-SICI: error: instruction not supported on this GPU
58// ERR-VI: error: operands are not valid for this GPU or mode
59
60v_sub_u32 v1, 4.0, v2
61// GFX9: v_sub_u32_e32 v1, 4.0, v2       ; encoding: [0xf6,0x04,0x02,0x6a]
62// ERR-SICI: error: instruction not supported on this GPU
63// ERR-VI: error: operands are not valid for this GPU or mode
64
65v_sub_u32 v1, v2, 4.0
66// GFX9: v_sub_u32_e64 v1, v2, 4.0       ; encoding: [0x01,0x00,0x35,0xd1,0x02,0xed,0x01,0x00]
67// ERR-SICI: error: instruction not supported on this GPU
68// ERR-VI: error: operands are not valid for this GPU or mode
69
70v_sub_u32_e32 v1, v2, v3
71// GFX9: v_sub_u32_e32 v1, v2, v3        ; encoding: [0x02,0x07,0x02,0x6a]
72// ERR-SICI: error: instruction not supported on this GPU
73// ERR-VI: error: operands are not valid for this GPU or mode
74
75v_sub_u32_e32 v1, s1, v3
76// GFX9: v_sub_u32_e32 v1, s1, v3        ; encoding: [0x01,0x06,0x02,0x6a]
77// ERR-SICI: error: instruction not supported on this GPU
78// ERR-VI: error: operands are not valid for this GPU or mode
79
80
81
82v_subrev_u32 v1, v2, v3
83// GFX9: v_subrev_u32_e32 v1, v2, v3     ; encoding: [0x02,0x07,0x02,0x6c]
84// ERR-SICI: error: instruction not supported on this GPU
85// ERR-VI: error: operands are not valid for this GPU or mode
86
87v_subrev_u32 v1, v2, s1
88// GFX9: v_subrev_u32_e64 v1, v2, s1     ; encoding: [0x01,0x00,0x36,0xd1,0x02,0x03,0x00,0x00]
89// ERR-SICI: error: instruction not supported on this GPU
90// ERR-VI: error: operands are not valid for this GPU or mode
91
92v_subrev_u32 v1, s1, v2
93// GFX9: v_subrev_u32_e32 v1, s1, v2     ; encoding: [0x01,0x04,0x02,0x6c]
94// ERR-SICI: error: instruction not supported on this GPU
95// ERR-VI: error: operands are not valid for this GPU or mode
96
97v_subrev_u32 v1, 4.0, v2
98// GFX9: v_subrev_u32_e32 v1, 4.0, v2    ; encoding: [0xf6,0x04,0x02,0x6c]
99// ERR-SICI: error: instruction not supported on this GPU
100// ERR-VI: error: operands are not valid for this GPU or mode
101
102v_subrev_u32 v1, v2, 4.0
103// GFX9: v_subrev_u32_e64 v1, v2, 4.0    ; encoding: [0x01,0x00,0x36,0xd1,0x02,0xed,0x01,0x00]
104// ERR-SICI: error: instruction not supported on this GPU
105// ERR-VI: error: operands are not valid for this GPU or mode
106
107v_subrev_u32_e32 v1, v2, v3
108// GFX9: v_subrev_u32_e32 v1, v2, v3     ; encoding: [0x02,0x07,0x02,0x6c]
109// ERR-SICI: error: instruction not supported on this GPU
110// ERR-VI: error: operands are not valid for this GPU or mode
111
112v_subrev_u32_e32 v1, s1, v3
113// GFX9: v_subrev_u32_e32 v1, s1, v3     ; encoding: [0x01,0x06,0x02,0x6c]
114// ERR-SICI: error: instruction not supported on this GPU
115// ERR-VI: error: operands are not valid for this GPU or mode
116