[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / AMDGPU / ds-err.s
blob7ed4080246a03166fc6872192b74b642065a2e45
1 // RUN: not llvm-mc -arch=amdgcn %s 2>&1 | FileCheck %s
2 // RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck %s
4 // offset too big
5 // CHECK: error: invalid operand for instruction
6 ds_add_u32 v2, v4 offset:1000000000
8 // offset too big
9 // CHECK: error: invalid operand for instruction
10 ds_add_u32 v2, v4 offset:0x10000
12 // offset0 twice
13 // CHECK: error: invalid operand for instruction
14 ds_write2_b32 v2, v4, v6 offset0:4 offset0:8
16 // offset1 twice
17 // CHECK: error: invalid operand for instruction
18 ds_write2_b32 v2, v4, v6 offset1:4 offset1:8
20 // offset0 too big
21 // CHECK: invalid operand for instruction
22 ds_write2_b32 v2, v4, v6 offset0:1000000000
24 // offset0 too big
25 // CHECK: invalid operand for instruction
26 ds_write2_b32 v2, v4, v6 offset0:0x100
28 // offset1 too big
29 // CHECK: invalid operand for instruction
30 ds_write2_b32 v2, v4, v6 offset1:1000000000
32 // offset1 too big
33 // CHECK: invalid operand for instruction
34 ds_write2_b32 v2, v4, v6 offset1:0x100
36 //===----------------------------------------------------------------------===//
37 // swizzle
38 //===----------------------------------------------------------------------===//
40 // CHECK: error: expected a colon
41 ds_swizzle_b32 v8, v2 offset
43 // CHECK: error: failed parsing operand
44 ds_swizzle_b32 v8, v2 offset:
46 // CHECK: error: expected a colon
47 ds_swizzle_b32 v8, v2 offset-
49 // CHECK: error: expected absolute expression
50 ds_swizzle_b32 v8, v2 offset:SWIZZLE(QUAD_PERM, 0, 1, 2, 3)
52 // CHECK: error: expected a swizzle mode
53 ds_swizzle_b32 v8, v2 offset:swizzle(quad_perm, 0, 1, 2, 3)
55 // CHECK: error: expected a swizzle mode
56 ds_swizzle_b32 v8, v2 offset:swizzle(XXX,1)
58 // CHECK: error: expected a comma
59 ds_swizzle_b32 v8, v2 offset:swizzle(QUAD_PERM
61 // CHECK: error: expected a comma
62 ds_swizzle_b32 v8, v2 offset:swizzle(QUAD_PERM, 0, 1, 2)
64 // CHECK: error: expected a closing parentheses
65 ds_swizzle_b32 v8, v2 offset:swizzle(QUAD_PERM, 0, 1, 2, 3
67 // CHECK: error: expected a closing parentheses
68 ds_swizzle_b32 v8, v2 offset:swizzle(QUAD_PERM, 0, 1, 2, 3, 4)
70 // CHECK: error: expected a 2-bit lane id
71 ds_swizzle_b32 v8, v2 offset:swizzle(QUAD_PERM, -1, 1, 2, 3)
73 // CHECK: error: expected a 2-bit lane id
74 ds_swizzle_b32 v8, v2 offset:swizzle(QUAD_PERM, 4, 1, 2, 3)
76 // CHECK: error: group size must be in the interval [1,16]
77 ds_swizzle_b32 v8, v2 offset:swizzle(SWAP,0)
79 // CHECK: error: group size must be a power of two
80 ds_swizzle_b32 v8, v2 offset:swizzle(SWAP,3)
82 // CHECK: error: group size must be in the interval [1,16]
83 ds_swizzle_b32 v8, v2 offset:swizzle(SWAP,17)
85 // CHECK: error: group size must be in the interval [1,16]
86 ds_swizzle_b32 v8, v2 offset:swizzle(SWAP,32)
88 // CHECK: error: group size must be in the interval [2,32]
89 ds_swizzle_b32 v8, v2 offset:swizzle(REVERSE,1)
91 // CHECK: error: group size must be a power of two
92 ds_swizzle_b32 v8, v2 offset:swizzle(REVERSE,3)
94 // CHECK: error: group size must be in the interval [2,32]
95 ds_swizzle_b32 v8, v2 offset:swizzle(REVERSE,33)
97 // CHECK: error: group size must be in the interval [2,32]
98 ds_swizzle_b32 v8, v2 offset:swizzle(BROADCAST,1,0)
100 // CHECK: error: group size must be a power of two
101 ds_swizzle_b32 v8, v2 offset:swizzle(BROADCAST,3,1)
103 // CHECK: error: group size must be in the interval [2,32]
104 ds_swizzle_b32 v8, v2 offset:swizzle(BROADCAST,33,1)
106 // CHECK: error: lane id must be in the interval [0,group size - 1]
107 ds_swizzle_b32 v8, v2 offset:swizzle(BROADCAST,2,-1)
109 // CHECK: error: lane id must be in the interval [0,group size - 1]
110 ds_swizzle_b32 v8, v2 offset:swizzle(BROADCAST,2,2)
112 // CHECK: error: expected a string
113 ds_swizzle_b32 v8, v2 offset:swizzle(BITMASK_PERM, pppii)
115 // CHECK: error: expected a 5-character mask
116 ds_swizzle_b32 v8, v2 offset:swizzle(BITMASK_PERM, "")
118 // CHECK: error: expected a 5-character mask
119 ds_swizzle_b32 v8, v2 offset:swizzle(BITMASK_PERM, "ppii")
121 // CHECK: error: expected a 5-character mask
122 ds_swizzle_b32 v8, v2 offset:swizzle(BITMASK_PERM, "pppiii")
124 // CHECK: invalid mask
125 ds_swizzle_b32 v8, v2 offset:swizzle(BITMASK_PERM, "pppi2")