236 lines · plain
1// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck %s --implicit-check-not=error: --strict-whitespace2 3//==============================================================================4// 'null' operand is not supported on this GPU5 6s_add_u32 null, null, null7// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: 'null' operand is not supported on this GPU8// CHECK-NEXT:{{^}}s_add_u32 null, null, null9// CHECK-NEXT:{{^}} ^10 11//==============================================================================12// ABS not allowed in VOP3B instructions13 14v_div_scale_f64 v[24:25], vcc, -|v[22:23]|, v[22:23], v[20:21]15// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: ABS not allowed in VOP3B instructions16// CHECK-NEXT:{{^}}v_div_scale_f64 v[24:25], vcc, -|v[22:23]|, v[22:23], v[20:21]17// CHECK-NEXT:{{^}}^18 19//==============================================================================20// dlc modifier is not supported on this GPU21 22scratch_load_ubyte v1, v2, off dlc23// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: dlc modifier is not supported on this GPU24// CHECK-NEXT:{{^}}scratch_load_ubyte v1, v2, off dlc25// CHECK-NEXT:{{^}} ^26 27scratch_load_ubyte v1, v2, off nodlc28// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: dlc modifier is not supported on this GPU29// CHECK-NEXT:{{^}}scratch_load_ubyte v1, v2, off nodlc30// CHECK-NEXT:{{^}} ^31 32//==============================================================================33// duplicate VGPR index mode34 35s_set_gpr_idx_on s0, gpr_idx(SRC0,DST,SRC1,DST)36// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: duplicate VGPR index mode37// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(SRC0,DST,SRC1,DST)38// CHECK-NEXT:{{^}} ^39 40//==============================================================================41// exp target is not supported on this GPU42 43exp pos4 v4, v3, v2, v144// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: exp target is not supported on this GPU45// CHECK-NEXT:{{^}}exp pos4 v4, v3, v2, v146// CHECK-NEXT:{{^}} ^47 48//==============================================================================49// expected a 12-bit unsigned offset50 51flat_load_dword v1, v[3:4] offset:-152// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a 12-bit unsigned offset53// CHECK-NEXT:{{^}}flat_load_dword v1, v[3:4] offset:-154// CHECK-NEXT:{{^}} ^55 56flat_load_dword v1, v[3:4] offset:409657// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a 12-bit unsigned offset58// CHECK-NEXT:{{^}}flat_load_dword v1, v[3:4] offset:409659// CHECK-NEXT:{{^}} ^60 61//==============================================================================62// expected a 13-bit signed offset63 64global_load_dword v1, v[3:4] off, offset:-409765// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a 13-bit signed offset66// CHECK-NEXT:{{^}}global_load_dword v1, v[3:4] off, offset:-409767// CHECK-NEXT:{{^}} ^68 69//==============================================================================70// expected a VGPR index mode71 72s_set_gpr_idx_on s0, gpr_idx(SRC0,73// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a VGPR index mode74// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(SRC0,75// CHECK-NEXT:{{^}} ^76 77//==============================================================================78// expected a VGPR index mode or a closing parenthesis79 80s_set_gpr_idx_on s0, gpr_idx(81// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a VGPR index mode or a closing parenthesis82// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(83// CHECK-NEXT:{{^}} ^84 85s_set_gpr_idx_on s0, gpr_idx(X)86// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a VGPR index mode or a closing parenthesis87// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(X)88// CHECK-NEXT:{{^}} ^89 90//==============================================================================91// expected a comma or a closing parenthesis92 93s_set_gpr_idx_on s0, gpr_idx(DST94// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a comma or a closing parenthesis95// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(DST96// CHECK-NEXT:{{^}} ^97 98//==============================================================================99// expected absolute expression100 101s_set_gpr_idx_on s0, gpr_idx102// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected absolute expression103// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx104// CHECK-NEXT:{{^}} ^105 106s_set_gpr_idx_on s0, s1107// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected absolute expression108// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, s1109// CHECK-NEXT:{{^}} ^110 111//==============================================================================112// invalid atomic image dmask113 114image_atomic_add v252, v2, s[8:15]115// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid atomic image dmask116// CHECK-NEXT:{{^}}image_atomic_add v252, v2, s[8:15]117// CHECK-NEXT:{{^}}^118 119image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xe tfe120// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid atomic image dmask121// CHECK-NEXT:{{^}}image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xe tfe122// CHECK-NEXT:{{^}} ^123 124//==============================================================================125// invalid image_gather dmask: only one bit must be set126 127image_gather4_cl v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x3128// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid image_gather dmask: only one bit must be set129// CHECK-NEXT:{{^}}image_gather4_cl v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x3130// CHECK-NEXT:{{^}} ^131 132//==============================================================================133// invalid immediate: only 4-bit values are legal134 135s_set_gpr_idx_on s0, 16136// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid immediate: only 4-bit values are legal137// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, 16138// CHECK-NEXT:{{^}} ^139 140//==============================================================================141// invalid operand (violates constant bus restrictions)142 143v_add_f32_e64 v0, flat_scratch_hi, m0144// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)145// CHECK-NEXT:{{^}}v_add_f32_e64 v0, flat_scratch_hi, m0146// CHECK-NEXT:{{^}} ^147 148v_madak_f32 v5, s1, v2, 0xa1b1c1d1149// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)150// CHECK-NEXT:{{^}}v_madak_f32 v5, s1, v2, 0xa1b1c1d1151// CHECK-NEXT:{{^}} ^152 153v_madmk_f32 v5, s1, 0x11213141, v255154// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)155// CHECK-NEXT:{{^}}v_madmk_f32 v5, s1, 0x11213141, v255156// CHECK-NEXT:{{^}} ^157 158//==============================================================================159// literal operands are not supported160 161v_bfe_u32 v0, v2, v3, undef162// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported163// CHECK-NEXT:{{^}}v_bfe_u32 v0, v2, v3, undef164// CHECK-NEXT:{{^}} ^165 166v_bfe_u32 v0, v2, undef, v3167// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported168// CHECK-NEXT:{{^}}v_bfe_u32 v0, v2, undef, v3169// CHECK-NEXT:{{^}} ^170 171//==============================================================================172// too few operands for instruction173 174buffer_load_dword off, s[8:11], s3175// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction176// CHECK-NEXT:{{^}}buffer_load_dword off, s[8:11], s3177// CHECK-NEXT:{{^}}^178 179buffer_load_dword off, s[8:11], s3 offset:1180// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction181// CHECK-NEXT:{{^}}buffer_load_dword off, s[8:11], s3 offset:1182// CHECK-NEXT:{{^}}^183 184//==============================================================================185// r128 modifier is not supported on this GPU186 187image_atomic_add v10, v6, s[8:15] dmask:0x1 r128188// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU189// CHECK-NEXT:{{^}}image_atomic_add v10, v6, s[8:15] dmask:0x1 r128190// CHECK-NEXT:{{^}} ^191 192image_atomic_add v10, v6, s[8:15] dmask:0x1 nor128193// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU194// CHECK-NEXT:{{^}}image_atomic_add v10, v6, s[8:15] dmask:0x1 nor128195// CHECK-NEXT:{{^}} ^196 197//==============================================================================198// unified format is not supported on this GPU199 200tbuffer_store_format_xyzw v[1:4], v1, s[4:7], s0 format:[BUF_FMT_8_SNORM,BUF_DATA_FORMAT_8] idxen201// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: unified format is not supported on this GPU202// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], v1, s[4:7], s0 format:[BUF_FMT_8_SNORM,BUF_DATA_FORMAT_8] idxen203// CHECK-NEXT:{{^}} ^204 205//==============================================================================206// duplicate format207 208tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7], dfmt:1 s0 format:[BUF_NUM_FORMAT_FLOAT]209// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: duplicate format210// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7], dfmt:1 s0 format:[BUF_NUM_FORMAT_FLOAT]211// CHECK-NEXT:{{^}} ^212 213//==============================================================================214// not a valid operand215 216v_cndmask_b32_sdwa v5, sext(v1), v2, vcc dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:BYTE_0 src1_sel:WORD_0217// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.218// CHECK-NEXT:{{^}}v_cndmask_b32_sdwa v5, sext(v1), v2, vcc dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:BYTE_0 src1_sel:WORD_0219// CHECK-NEXT:{{^}} ^220 221//==============================================================================222// out of range dfmt223 224tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7] dfmt:16 nfmt:1 s0225// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: out of range dfmt226// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7] dfmt:16 nfmt:1 s0227// CHECK-NEXT:{{^}} ^228 229//==============================================================================230// out of range nfmt231 232tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7] dfmt:1 nfmt:-1 s0233// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: out of range nfmt234// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7] dfmt:1 nfmt:-1 s0235// CHECK-NEXT:{{^}} ^236