121
|
1 // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefix=GFX9 -check-prefix=GCN %s
|
|
2 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck -check-prefix=VI -check-prefix=GCN %s
|
|
3
|
|
4 // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding 2>&1 %s | FileCheck -check-prefix=GFX9-ERR -check-prefix=GCNERR %s
|
|
5 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding 2>&1 %s | FileCheck -check-prefix=VI-ERR -check-prefix=GCNERR %s
|
|
6
|
|
7
|
|
8 flat_load_dword v1, v[3:4] offset:0
|
|
9 // GCN: flat_load_dword v1, v[3:4] ; encoding: [0x00,0x00,0x50,0xdc,0x03,0x00,0x00,0x01]
|
|
10
|
|
11 flat_load_dword v1, v[3:4] offset:-1
|
|
12 // GCN-ERR: :35: error: failed parsing operand.
|
|
13
|
|
14 // FIXME: Error on VI in wrong column
|
|
15 flat_load_dword v1, v[3:4] offset:4095
|
|
16 // GFX9: flat_load_dword v1, v[3:4] offset:4095 ; encoding: [0xff,0x0f,0x50,0xdc,0x03,0x00,0x00,0x01]
|
|
17 // VIERR: :1: error: invalid operand for instruction
|
|
18
|
|
19 flat_load_dword v1, v[3:4] offset:4096
|
|
20 // GCNERR: :28: error: invalid operand for instruction
|
|
21
|
|
22 flat_load_dword v1, v[3:4] offset:4 glc
|
|
23 // GFX9: flat_load_dword v1, v[3:4] offset:4 glc ; encoding: [0x04,0x00,0x51,0xdc,0x03,0x00,0x00,0x01]
|
|
24 // VIERR: :1: error: invalid operand for instruction
|
|
25
|
|
26 flat_load_dword v1, v[3:4] offset:4 glc slc
|
|
27 // GFX9: flat_load_dword v1, v[3:4] offset:4 glc slc ; encoding: [0x04,0x00,0x53,0xdc,0x03,0x00,0x00,0x01]
|
|
28 // VIERR: :1: error: invalid operand for instruction
|
|
29
|
|
30 flat_atomic_add v[3:4], v5 offset:8 slc
|
|
31 // GFX9: flat_atomic_add v[3:4], v5 offset:8 slc ; encoding: [0x08,0x00,0x0a,0xdd,0x03,0x05,0x00,0x00]
|
|
32 // VIERR: :1: error: invalid operand for instruction
|
|
33
|
|
34 flat_atomic_swap v[3:4], v5 offset:16
|
|
35 // GFX9: flat_atomic_swap v[3:4], v5 offset:16 ; encoding: [0x10,0x00,0x00,0xdd,0x03,0x05,0x00,0x00]
|
|
36 // VIERR: :1: error: invalid operand for instruction
|
|
37
|
|
38 flat_store_dword v[3:4], v1 offset:16
|
|
39 // GFX9: flat_store_dword v[3:4], v1 offset:16 ; encoding: [0x10,0x00,0x70,0xdc,0x03,0x01,0x00,0x00]
|
|
40 // VIERR: :1: error: invalid operand for instruction
|
|
41
|
|
42 flat_store_dword v[3:4], v1, off
|
|
43 // GCNERR: :30: error: invalid operand for instruction
|
|
44
|
|
45 flat_store_dword v[3:4], v1, s[0:1]
|
|
46 // GCNERR: :30: error: invalid operand for instruction
|
|
47
|
|
48 flat_store_dword v[3:4], v1, s0
|
|
49 // GCNERR: :30: error: invalid operand for instruction
|
|
50
|
|
51 flat_load_dword v1, v[3:4], off
|
|
52 // GCNERR: :29: error: invalid operand for instruction
|
|
53
|
|
54 flat_load_dword v1, v[3:4], s[0:1]
|
|
55 // GCNERR: :29: error: invalid operand for instruction
|
|
56
|
|
57 flat_load_dword v1, v[3:4], s0
|
|
58 // GCNERR: :29: error: invalid operand for instruction
|
|
59
|
|
60 flat_load_dword v1, v[3:4], exec_hi
|
|
61 // GCNERR: :29: error: invalid operand for instruction
|
|
62
|
|
63 flat_store_dword v[3:4], v1, exec_hi
|
|
64 // GCNERR: :30: error: invalid operand for instruction
|
|
65
|
|
66 flat_load_ubyte_d16 v1, v[3:4]
|
|
67 // GFX9: flat_load_ubyte_d16 v1, v[3:4] ; encoding: [0x00,0x00,0x80,0xdc,0x03,0x00,0x00,0x01]
|
|
68 // VI-ERR: error: instruction not supported on this GPU
|
|
69
|
|
70 flat_load_ubyte_d16_hi v1, v[3:4]
|
|
71 // GFX9: flat_load_ubyte_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x84,0xdc,0x03,0x00,0x00,0x01]
|
|
72 // VI-ERR: error: instruction not supported on this GPU
|
|
73
|
|
74 flat_load_sbyte_d16 v1, v[3:4]
|
|
75 // GFX9: flat_load_sbyte_d16 v1, v[3:4] ; encoding: [0x00,0x00,0x88,0xdc,0x03,0x00,0x00,0x01]
|
|
76 // VI-ERR: error: instruction not supported on this GPU
|
|
77
|
|
78 flat_load_sbyte_d16_hi v1, v[3:4]
|
|
79 // GFX9: flat_load_sbyte_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x8c,0xdc,0x03,0x00,0x00,0x01]
|
|
80 // VI-ERR: error: instruction not supported on this GPU
|
|
81
|
|
82 flat_load_short_d16 v1, v[3:4]
|
|
83 // GFX9: flat_load_short_d16 v1, v[3:4] ; encoding: [0x00,0x00,0x90,0xdc,0x03,0x00,0x00,0x01]
|
|
84 // VI-ERR: error: instruction not supported on this GPU
|
|
85
|
|
86 flat_load_short_d16_hi v1, v[3:4]
|
|
87 // GFX9: flat_load_short_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x94,0xdc,0x03,0x00,0x00,0x01]
|
|
88 // VI-ERR: error: instruction not supported on this GPU
|
|
89
|
|
90 flat_store_byte_d16_hi v[3:4], v1
|
|
91 // GFX9: flat_store_byte_d16_hi v[3:4], v1 ; encoding: [0x00,0x00,0x64,0xdc,0x03,0x01,0x00,0x00]
|
|
92 // VI-ERR: error: instruction not supported on this GPU
|
|
93
|
|
94 flat_store_short_d16_hi v[3:4], v1
|
|
95 // GFX9: flat_store_short_d16_hi v[3:4], v1 ; encoding: [0x00,0x00,0x6c,0xdc,0x03,0x01,0x00,0x00
|
|
96 // VI-ERR: error: instruction not supported on this GPU
|