[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / AMDGPU / flat-scratch-st-mode.s
blobfe0fede5618238b2758cc3f8d1e60513befe16f8
1 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga 2>&1 %s | FileCheck -check-prefix=VI-ERR --implicit-check-not=error: %s
2 // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 2>&1 %s | FileCheck -check-prefix=GFX9_10-ERR --implicit-check-not=error: %s
3 // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 2>&1 %s | FileCheck --check-prefixes=GFX9_10-ERR --implicit-check-not=error: %s
4 // RUN: llvm-mc -arch=amdgcn -mcpu=gfx1030 -show-encoding %s | FileCheck --check-prefixes=GFX1030 %s
6 scratch_load_ubyte v1, off, off
7 // GFX1030: encoding: [0x00,0x40,0x20,0xdc,0x00,0x00,0x7f,0x01]
8 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
9 // VI-ERR: error: instruction not supported on this GPU
11 scratch_load_sbyte v1, off, off
12 // GFX1030: encoding: [0x00,0x40,0x24,0xdc,0x00,0x00,0x7f,0x01]
13 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
14 // VI-ERR: error: instruction not supported on this GPU
16 scratch_load_ushort v1, off, off
17 // GFX1030: encoding: [0x00,0x40,0x28,0xdc,0x00,0x00,0x7f,0x01]
18 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
19 // VI-ERR: error: instruction not supported on this GPU
21 scratch_load_sshort v1, off, off
22 // GFX1030: encoding: [0x00,0x40,0x2c,0xdc,0x00,0x00,0x7f,0x01]
23 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
24 // VI-ERR: error: instruction not supported on this GPU
26 scratch_load_dword v1, off, off
27 // GFX1030: encoding: [0x00,0x40,0x30,0xdc,0x00,0x00,0x7f,0x01]
28 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
29 // VI-ERR: error: instruction not supported on this GPU
31 scratch_load_dwordx2 v[1:2], off, off
32 // GFX1030: encoding: [0x00,0x40,0x34,0xdc,0x00,0x00,0x7f,0x01]
33 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
34 // VI-ERR: error: instruction not supported on this GPU
36 scratch_load_dwordx3 v[1:3], off, off
37 // GFX1030: encoding: [0x00,0x40,0x3c,0xdc,0x00,0x00,0x7f,0x01]
38 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
39 // VI-ERR: error: instruction not supported on this GPU
41 scratch_load_dwordx4 v[1:4], off, off
42 // GFX1030: encoding: [0x00,0x40,0x38,0xdc,0x00,0x00,0x7f,0x01]
43 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
44 // VI-ERR: error: instruction not supported on this GPU
46 scratch_load_dword v1, off, off offset:2047
47 // GFX1030: scratch_load_dword v1, off, off offset:2047 ; encoding: [0xff,0x47,0x30,0xdc,0x00,0x00,0x7f,0x01]
48 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
49 // VI-ERR: error: instruction not supported on this GPU
51 scratch_store_byte off, v2, off
52 // GFX1030: encoding: [0x00,0x40,0x60,0xdc,0x00,0x02,0x7f,0x00]
53 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
54 // VI-ERR: error: instruction not supported on this GPU
56 scratch_store_short off, v2, off
57 // GFX1030: encoding: [0x00,0x40,0x68,0xdc,0x00,0x02,0x7f,0x00]
58 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
59 // VI-ERR: error: instruction not supported on this GPU
61 scratch_store_dword off, v2, off
62 // GFX1030: encoding: [0x00,0x40,0x70,0xdc,0x00,0x02,0x7f,0x00]
63 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
64 // VI-ERR: error: instruction not supported on this GPU
66 scratch_store_dwordx2 off, v[2:3], off
67 // GFX1030: encoding: [0x00,0x40,0x74,0xdc,0x00,0x02,0x7f,0x00]
68 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
69 // VI-ERR: error: instruction not supported on this GPU
71 scratch_store_dwordx3 off, v[2:4], off
72 // GFX1030: encoding: [0x00,0x40,0x7c,0xdc,0x00,0x02,0x7f,0x00]
73 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
74 // VI-ERR: error: instruction not supported on this GPU
76 scratch_store_dwordx4 off, v[2:5], off
77 // GFX1030: encoding: [0x00,0x40,0x78,0xdc,0x00,0x02,0x7f,0x00]
78 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
79 // VI-ERR: error: instruction not supported on this GPU
81 scratch_store_dword off, v2, off offset:2047
82 // GFX1030: scratch_store_dword off, v2, off offset:2047 ; encoding: [0xff,0x47,0x70,0xdc,0x00,0x02,0x7f,0x00]
83 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
84 // VI-ERR: error: instruction not supported on this GPU
86 scratch_load_ubyte_d16 v1, off, off
87 // GFX1030: encoding: [0x00,0x40,0x80,0xdc,0x00,0x00,0x7f,0x01]
88 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
89 // VI-ERR: error: instruction not supported on this GPU
91 scratch_load_ubyte_d16_hi v1, off, off
92 // GFX1030: encoding: [0x00,0x40,0x84,0xdc,0x00,0x00,0x7f,0x01]
93 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
94 // VI-ERR: error: instruction not supported on this GPU
96 scratch_load_sbyte_d16 v1, off, off
97 // GFX1030: encoding: [0x00,0x40,0x88,0xdc,0x00,0x00,0x7f,0x01]
98 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
99 // VI-ERR: error: instruction not supported on this GPU
101 scratch_load_sbyte_d16_hi v1, off, off
102 // GFX1030: encoding: [0x00,0x40,0x8c,0xdc,0x00,0x00,0x7f,0x01]
103 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
104 // VI-ERR: error: instruction not supported on this GPU
106 scratch_load_short_d16 v1, off, off
107 // GFX1030: encoding: [0x00,0x40,0x90,0xdc,0x00,0x00,0x7f,0x01]
108 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
109 // VI-ERR: error: instruction not supported on this GPU
111 scratch_load_short_d16_hi v1, off, off
112 // GFX1030: encoding: [0x00,0x40,0x94,0xdc,0x00,0x00,0x7f,0x01]
113 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
114 // VI-ERR: error: instruction not supported on this GPU
116 scratch_store_byte_d16_hi off, v2, off
117 // GFX1030: encoding: [0x00,0x40,0x64,0xdc,0x00,0x02,0x7f,0x00]
118 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
119 // VI-ERR: error: instruction not supported on this GPU
122 scratch_store_short_d16_hi off, v2, off
123 // GFX1030: encoding: [0x00,0x40,0x6c,0xdc,0x00,0x02,0x7f,0x00]
124 // GFX9_10-ERR: error: operands are not valid for this GPU or mode
125 // VI-ERR: error: instruction not supported on this GPU