2020-09-02 18:42:18 +02:00
|
|
|
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck -check-prefix=GFX9 --implicit-check-not=error: %s
|
2017-02-27 19:49:11 +01:00
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 25: error: invalid operand for instruction
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 32: error: expected a left square bracket
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 33: error: unknown token in expression
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 33: error: unknown token in expression
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[]
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 33: error: unknown token in expression
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[,]
|
|
|
|
|
2020-09-02 18:42:18 +02:00
|
|
|
// FIXME: Should trigger an error.
|
2017-02-27 19:49:11 +01:00
|
|
|
// v_pk_add_u16 v1, v2, v3 op_sel:[0]
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 35: error: expected a comma
|
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[0 0]
|
|
|
|
|
|
|
|
// GFX9: 35: error: unknown token in expression
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[0,]
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 33: error: unknown token in expression
|
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[,0]
|
|
|
|
|
|
|
|
// GFX9: 42: error: expected a closing square bracket
|
|
|
|
v_max3_f16 v5, v1, v2, v3 op_sel:[1,1,1,1,
|
|
|
|
|
|
|
|
// GFX9: 42: error: expected a closing square bracket
|
|
|
|
v_max3_f16 v5, v1, v2, v3 op_sel:[1,1,1,1[
|
|
|
|
|
|
|
|
// GFX9: 43: error: expected a closing square bracket
|
|
|
|
v_max3_f16 v5, v1, v2, v3 op_sel:[1,1,1,1 1
|
2017-02-27 19:49:11 +01:00
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 35: error: invalid op_sel value.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[0,2]
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 33: error: invalid op_sel value.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[2,0]
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 33: error: invalid op_sel value.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[-1,0]
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 35: error: invalid op_sel value.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[0,-1]
|
|
|
|
|
2019-05-22 15:59:01 +02:00
|
|
|
// GFX9: 40: error: expected a closing square bracket
|
2017-07-21 15:54:11 +02:00
|
|
|
v_pk_add_u16 v1, v2, v3 op_sel:[0,0,0,0,0]
|
2017-02-27 19:49:11 +01:00
|
|
|
|
2020-09-02 18:42:18 +02:00
|
|
|
// FIXME: should trigger an error
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, v2, v3 neg_lo:[0,0]
|
|
|
|
|
|
|
|
//
|
|
|
|
// Regular modifiers on packed instructions
|
|
|
|
//
|
|
|
|
|
2020-09-02 18:42:18 +02:00
|
|
|
// FIXME: should be "invalid operand for instruction"
|
2017-02-27 19:49:11 +01:00
|
|
|
// GFX9: :18: error: not a valid operand.
|
|
|
|
v_pk_add_f16 v1, |v2|, v3
|
|
|
|
|
2019-05-17 15:17:48 +02:00
|
|
|
// GFX9: :18: error: not a valid operand
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_f16 v1, abs(v2), v3
|
|
|
|
|
|
|
|
// GFX9: :22: error: not a valid operand.
|
|
|
|
v_pk_add_f16 v1, v2, |v3|
|
|
|
|
|
2019-05-17 15:17:48 +02:00
|
|
|
// GFX9: :22: error: not a valid operand.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_f16 v1, v2, abs(v3)
|
|
|
|
|
2019-05-17 15:17:48 +02:00
|
|
|
// GFX9: :18: error: not a valid operand.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_f16 v1, -v2, v3
|
|
|
|
|
2019-05-17 15:17:48 +02:00
|
|
|
// GFX9: :22: error: not a valid operand.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_f16 v1, v2, -v3
|
|
|
|
|
2019-05-17 15:17:48 +02:00
|
|
|
// GFX9: :18: error: not a valid operand.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, abs(v2), v3
|
|
|
|
|
2019-05-17 15:17:48 +02:00
|
|
|
// GFX9: :18: error: not a valid operand.
|
2017-02-27 19:49:11 +01:00
|
|
|
v_pk_add_u16 v1, -v2, v3
|
|
|
|
|
2017-03-03 15:31:06 +01:00
|
|
|
//
|
|
|
|
// Constant bus restrictions
|
|
|
|
//
|
|
|
|
|
2020-09-02 18:42:18 +02:00
|
|
|
// GFX9: error: invalid operand (violates constant bus restrictions)
|
2017-03-03 15:31:06 +01:00
|
|
|
v_pk_add_f16 v255, s1, s2
|