diff options
author | Dmitry Preobrazhensky <dmitry.preobrazhensky@amd.com> | 2017-12-22 18:03:35 +0000 |
---|---|---|
committer | Dmitry Preobrazhensky <dmitry.preobrazhensky@amd.com> | 2017-12-22 18:03:35 +0000 |
commit | c1fce707b0049a79cc1ca9e4995956e89af82769 (patch) | |
tree | 29d34d3ef9963efd414cc68406fb0412385095d0 /test/MC | |
parent | 15c5ab82da5355381525fe3f4f1c2acfea22cf29 (diff) |
[AMDGPU][MC] Corrected handling of negative expressions
See bug 35716: https://bugs.llvm.org/show_bug.cgi?id=35716
Reviewers: artem.tamazov, arsenm
Differential Revision: https://reviews.llvm.org/D41488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/AMDGPU/expressions.s | 8 | ||||
-rw-r--r-- | test/MC/AMDGPU/vop3p-err.s | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/test/MC/AMDGPU/expressions.s b/test/MC/AMDGPU/expressions.s index 7b0e90378a0..dd4957c8bae 100644 --- a/test/MC/AMDGPU/expressions.s +++ b/test/MC/AMDGPU/expressions.s @@ -46,3 +46,11 @@ BB2: s_sub_u32 vcc_lo, vcc_lo, (BB2+4)-BB1 // VI: s_sub_u32 vcc_lo, vcc_lo, (BB2+4)-BB1 ; encoding: [0x6a,0xff,0xea,0x80,A,A,A,A] // VI-NEXT: ; fixup A - offset: 4, value: (BB2+4)-BB1, kind: FK_Data_4 + +t=1 +s_sub_u32 s0, s0, -t +// VI: s_sub_u32 s0, s0, -1 ; encoding: [0x00,0xc1,0x80,0x80] + +t=-1 +s_sub_u32 s0, s0, -t +// VI: s_sub_u32 s0, s0, 1 ; encoding: [0x00,0x81,0x80,0x80] diff --git a/test/MC/AMDGPU/vop3p-err.s b/test/MC/AMDGPU/vop3p-err.s index 7dfd951b6ad..fe3fee97b5e 100644 --- a/test/MC/AMDGPU/vop3p-err.s +++ b/test/MC/AMDGPU/vop3p-err.s @@ -59,16 +59,16 @@ v_pk_add_f16 v1, v2, |v3| // GFX9: :22: error: invalid operand for instruction v_pk_add_f16 v1, v2, abs(v3) -// GFX9: :19: error: invalid operand for instruction +// GFX9: :18: error: invalid operand for instruction v_pk_add_f16 v1, -v2, v3 -// GFX9: :23: error: invalid operand for instruction +// GFX9: :22: error: invalid operand for instruction v_pk_add_f16 v1, v2, -v3 // GFX9: :18: error: invalid operand for instruction v_pk_add_u16 v1, abs(v2), v3 -// GFX9: :19: error: invalid operand for instruction +// GFX9: :18: error: invalid operand for instruction v_pk_add_u16 v1, -v2, v3 // |