diff options
Diffstat (limited to 'llvm/test/MC/AMDGPU/expressions-gfx9.s')
-rw-r--r-- | llvm/test/MC/AMDGPU/expressions-gfx9.s | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/MC/AMDGPU/expressions-gfx9.s b/llvm/test/MC/AMDGPU/expressions-gfx9.s index b1be72b019a..a52887596af 100644 --- a/llvm/test/MC/AMDGPU/expressions-gfx9.s +++ b/llvm/test/MC/AMDGPU/expressions-gfx9.s @@ -9,6 +9,23 @@ v_mov_b32_sdwa v1, sext(u) // NOGFX9: error: expected an absolute expression //===----------------------------------------------------------------------===// +// Instructions can use only one literal. +// Relocatable expressions are counted as literals. +//===----------------------------------------------------------------------===// + +s_sub_u32 s0, 123, u +// NOGFX9: error: only one literal operand is allowed + +s_sub_u32 s0, u, u +// NOGFX9: error: only one literal operand is allowed + +s_sub_u32 s0, u, u1 +// NOGFX9: error: only one literal operand is allowed + +v_bfe_u32 v0, v2, v3, u +// NOGFX9: error: invalid literal operand + +//===----------------------------------------------------------------------===// // Constant expressions may be used with 'sext' modifier //===----------------------------------------------------------------------===// |