Scott Linder
a3593cb44b
[AMDGPU] Fix lit failures introduced in r335281
...
The tests do not support big-endian hosts.
llvm-svn: 335302
2018-06-21 22:30:09 +00:00
Scott Linder
1e8c2c705d
[AMDGPU] Update assembler for HSA Code Object v3
...
Update AMDGPU assembler syntax behind the code-object-v3 feature:
* Replace/rename most AMDGPU assembler directives/symbols and document them.
* Provide more diagnostics (e.g. values out of range, missing values, repeated
values).
* Provide path for backwards compatibility, even with underlying descriptor
changes.
Differential Revision: https://reviews.llvm.org/D47736
llvm-svn: 335281
2018-06-21 19:38:56 +00:00
Nicolai Haehnle
15745ba5c1
AMDGPU: Remove redundant MIMG instruction variants
...
Summary:
For sample and gather ops, we can accurately determine the set of
vaddr-size instruction variants that are required. This reduces
the size of instruction tables by ~5%.
The number of machine instruction opcodes is reduced from 10002
to 9476.
Change-Id: Ie7fc65d3657b762c7816017fe70b2e9bec644a8a
Reviewers: arsenm, rampitec
Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, llvm-commits, t-tye
Differential Revision: https://reviews.llvm.org/D48168
llvm-svn: 335232
2018-06-21 13:37:55 +00:00
Nicolai Haehnle
f267431901
AMDGPU: Turn D16 for MIMG instructions into a regular operand
...
Summary:
This allows us to reduce the number of different machine instruction
opcodes, which reduces the table sizes and helps flatten the TableGen
multiclass hierarchies.
We can do this because for each hardware MIMG opcode, we have a full set
of IMAGE_xxx_Vn_Vm machine instructions for all required sizes of vdata
and vaddr registers. Instead of having separate D16 machine instructions,
a packed D16 instructions loading e.g. 4 components can simply use the
same V2 opcode variant that non-D16 instructions use.
We still require a TSFlag for D16 buffer instructions, because the
D16-ness of buffer instructions is part of the opcode. Renaming the flag
should help avoid future confusion.
The one non-obvious code change is that for gather4 instructions, the
disassembler can no longer automatically decide whether to use a V2 or
a V4 variant. The existing logic which choose the correct variant for
other MIMG instruction is extended to cover gather4 as well.
As a bonus, some of the assembler error messages are now more helpful
(e.g., complaining about a wrong data size instead of a non-existing
instruction).
While we're at it, delete a whole bunch of dead legacy TableGen code.
Change-Id: I89b02c2841c06f95e662541433e597f5d4553978
Reviewers: arsenm, rampitec, kzhuravl, artem.tamazov, dp, rtaylor
Subscribers: wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D47434
llvm-svn: 335222
2018-06-21 13:36:01 +00:00
Dmitry Preobrazhensky
32c6b5cb70
[AMDGPU][MC] Enabled parsing of relocations on VALU instructions
...
See bug 37566: https://bugs.llvm.org/show_bug.cgi?id=37566
Reviewers: artem.tamazov, arsenm, nhaehnle
Differential Revision: https://reviews.llvm.org/D47884
llvm-svn: 334622
2018-06-13 17:02:03 +00:00
Dmitry Preobrazhensky
ffbee7acdc
[AMDGPU][MC][GFX8][GFX9] Allow LDS direct reads for BUFFER_LOAD_DWORDX2/X3/X4
...
See bug 37653: https://bugs.llvm.org/show_bug.cgi?id=37653
Reviewers: artem.tamazov, arsenm
Differential Revision: https://reviews.llvm.org/D47885
llvm-svn: 334609
2018-06-13 15:32:46 +00:00
Konstantin Zhuravlyov
3e5d66ac66
AMDGPU: Add 64-bit relative variant kind
...
Differential Revision: https://reviews.llvm.org/D47601
llvm-svn: 334443
2018-06-11 21:37:57 +00:00
Konstantin Zhuravlyov
f13c9969fc
AMDGPU: Fix v_dot{4, 8}* instruction encoding
...
Differential Revision: https://reviews.llvm.org/D46848
llvm-svn: 332387
2018-05-15 19:32:47 +00:00
Konstantin Zhuravlyov
c2c2eb7d01
AMDGPU: Add D16 instructions preserve unused bits feature
...
- Predicate D16 patterns on this new feature
- Added this new feature to gfx900/2/4
Differential Revision: https://reviews.llvm.org/D46366
llvm-svn: 331551
2018-05-04 20:06:57 +00:00
Konstantin Zhuravlyov
1501af4846
AMDGPU: Remove remnants of gfx901 (it was deprecated some time ago)
...
llvm-svn: 331298
2018-05-01 18:47:48 +00:00
Konstantin Zhuravlyov
ca65870bd0
AMDGPU: Add missing gfx904 tests
...
llvm-svn: 331284
2018-05-01 17:05:44 +00:00
Matt Arsenault
0084adc516
AMDGPU: Add Vega12 and Vega20
...
Changes by
Matt Arsenault
Konstantin Zhuravlyov
llvm-svn: 331215
2018-04-30 19:08:16 +00:00
Dmitry Preobrazhensky
4c45e6ff0e
[AMDGPU][MC][VI][GFX9] Added support of SDWA/DPP for v_cndmask_b32
...
See bug 36356: https://bugs.llvm.org/show_bug.cgi?id=36356
Differential Revision: https://reviews.llvm.org/D45446
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 330123
2018-04-16 12:41:38 +00:00
Dmitry Preobrazhensky
fc715551a3
[AMDGPU][MC][GFX9] Added v_screen_partition_4se_b32
...
See bug 36845: https://bugs.llvm.org/show_bug.cgi?id=36845
Differential Revision: https://reviews.llvm.org/D45443
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329801
2018-04-11 13:13:30 +00:00
Konstantin Zhuravlyov
6183065b97
AMDGPU: Remove max_scratch_backing_memory_byte_size from kernel header
...
1. Remove max_scratch_backing_memory_byte_size from kernel header
2. Make it a reserved field
3. Ignore it while parsing assembly for backwards compatibility
4. Bump up minor version of kernel header
Differential Revision: https://reviews.llvm.org/D45452
llvm-svn: 329620
2018-04-09 20:47:22 +00:00
Dmitry Preobrazhensky
2f8e146ad3
[AMDGPU][MC][GFX9] Added instructions s_mul_hi_*32, s_lshl*_add_u32
...
See bugs
36841: https://bugs.llvm.org/show_bug.cgi?id=36841
36842: https://bugs.llvm.org/show_bug.cgi?id=36842
Differential Revision: https://reviews.llvm.org/D45251
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329562
2018-04-09 13:10:33 +00:00
Dmitry Preobrazhensky
ae31223ba7
[AMDGPU][MC][GFX9] Added s_call_b64
...
See bug 36843: https://bugs.llvm.org/show_bug.cgi?id=36843
Differential Revision: https://reviews.llvm.org/D45268
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329440
2018-04-06 18:24:49 +00:00
Dmitry Preobrazhensky
306b1a0119
[AMDGPU][MC][GFX9] Added instruction s_endpgm_ordered_ps_done
...
See bug 36844: https://bugs.llvm.org/show_bug.cgi?id=36844
Differential Revision: https://reviews.llvm.org/D45313
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329430
2018-04-06 17:25:00 +00:00
Dmitry Preobrazhensky
f20aff565d
[AMDGPU][MC][GFX9] Added instructions *saveexec*, *wrexec* and *bitreplicate*
...
See bug 36840: https://bugs.llvm.org/show_bug.cgi?id=36840
Differential Revision: https://reviews.llvm.org/D45250
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329419
2018-04-06 16:35:11 +00:00
Dmitry Preobrazhensky
59399ae4cc
[AMDGPU][MC][VI][GFX9] Added s_atc_probe* instructions
...
See bug 36839: https://bugs.llvm.org/show_bug.cgi?id=36839
Differential Revision: https://reviews.llvm.org/D45249
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329408
2018-04-06 15:48:39 +00:00
Dmitry Preobrazhensky
4732d876ee
[AMDGPU][MC][GFX9] Added s_dcache_discard* instructions
...
See bug 36838: https://bugs.llvm.org/show_bug.cgi?id=36838
Differential Revision: https://reviews.llvm.org/D45247
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329397
2018-04-06 15:08:42 +00:00
Dmitry Preobrazhensky
523872ea59
[AMDGPU][MC] Enabled instruction TBUFFER_LOAD_FORMAT_XYZ for SI/CI
...
See bug 36958: https://bugs.llvm.org/show_bug.cgi?id=36958
Differential Revision: https://reviews.llvm.org/D45099
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329197
2018-04-04 13:54:55 +00:00
Dmitry Preobrazhensky
a0b8cd038c
[AMDGPU][MC] Added support of 3-element addresses for MIMG instructions
...
See bug 35999: https://bugs.llvm.org/show_bug.cgi?id=35999
Differential Revision: https://reviews.llvm.org/D45084
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 329187
2018-04-04 13:01:17 +00:00
Dmitry Preobrazhensky
b181c7312e
[AMDGPU][MC][GFX9] Added instructions v_cvt_norm_*16_f16, v_sat_pk_u8_i16
...
See bug 36847: https://bugs.llvm.org/show_bug.cgi?id=36847
Differential Revision: https://reviews.llvm.org/D45097
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 328988
2018-04-02 17:09:20 +00:00
Dmitry Preobrazhensky
6bad04ecf5
[AMDGPU][MC][GFX9] Added s_atomic_* and s_buffer_atomic_* instructions
...
Fixed a bug which caused Tablegen crash.
See bug 36837: https://bugs.llvm.org/show_bug.cgi?id=36837
Differential Revision: https://reviews.llvm.org/D45085
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 328983
2018-04-02 16:10:25 +00:00
Nico Weber
f492f58182
Revert r328975, it makes TableGen assert on the bots.
...
llvm-svn: 328978
2018-04-02 14:20:23 +00:00
Dmitry Preobrazhensky
32c450ae6a
[AMDGPU][MC][GFX9] Added s_atomic_* and s_buffer_atomic_* instructions
...
See bug 36837: https://bugs.llvm.org/show_bug.cgi?id=36837
Differential Revision: https://reviews.llvm.org/D45085
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 328975
2018-04-02 13:52:23 +00:00
Dmitry Preobrazhensky
622bde8bc7
[AMDGPU][MC] Added ds_add_src2_f32
...
See bug 36833: https://bugs.llvm.org/show_bug.cgi?id=36833
Differential Revision: https://reviews.llvm.org/D44779
Reviewers: arsenm, artem.tamazov, timcorringham
llvm-svn: 328713
2018-03-28 16:21:56 +00:00
Dmitry Preobrazhensky
2456ac696a
[AMDGPU][MC] Added PCK variants of image load/store instructions
...
See bug 36834: https://bugs.llvm.org/show_bug.cgi?id=36834
Differential Revision: https://reviews.llvm.org/D44795
Reviewers: artem.tamazov, arsenm, timcorringham, nhaehnle
llvm-svn: 328710
2018-03-28 15:44:16 +00:00
Dmitry Preobrazhensky
a917e88585
[AMDGPU][MC][GFX9] Added buffer_*_format_d16_hi_x
...
See bug 36835: https://bugs.llvm.org/show_bug.cgi?id=36835
Differential Revision: https://reviews.llvm.org/D44825
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 328707
2018-03-28 14:53:13 +00:00
Dmitry Preobrazhensky
dd2b929ffb
[AMDGPU][MC][GFX9] Added s_scratch* instructions
...
See bug 36836: https://bugs.llvm.org/show_bug.cgi?id=36836
Differential Revision: https://reviews.llvm.org/D44832
Reviewers: artem.tamazov, arsenm, timcorringham
llvm-svn: 328704
2018-03-28 14:08:03 +00:00
Tim Corringham
7116e8963d
[AMDGPU] Improve disassembler error handling
...
Summary:
llvm-objdump now disassembles unrecognised opcodes as data, using
the .long directive. We treat unrecognised opcodes as being 32 bit
values, so move along 4 bytes rather than the single byte which
previously resulted in a cascade of bogus disassembly following an
unrecognised opcode.
While no solution can always disassemble code that contains
embedded data correctly this provides a significant improvement.
The disassembler will now cope with an arbitrary length section
as it no longer truncates it to a multiple of 4 bytes, and will
use the .byte directive for trailing bytes.
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D44685
llvm-svn: 328553
2018-03-26 17:06:33 +00:00
Dmitry Preobrazhensky
4c8f4234b6
[AMDGPU][MC][GFX8][GFX9][DISASSEMBLER] Added "_e32" suffix to 32-bit VINTRP opcodes
...
See bug 36751: https://bugs.llvm.org/show_bug.cgi?id=36751
Differential Revision: https://reviews.llvm.org/D44529
Reviewers: artem.tamazov, arsenm
llvm-svn: 327723
2018-03-16 16:38:04 +00:00
Dmitry Preobrazhensky
9c1a6e7e24
[AMDGPU][MC] Corrected default values for unused SDWA operands
...
See bug 36355: https://bugs.llvm.org/show_bug.cgi?id=36355
Differential Revision: https://reviews.llvm.org/D44481
Reviewers: artem.tamazov, arsenm
llvm-svn: 327720
2018-03-16 15:40:27 +00:00
Dmitry Preobrazhensky
d98c97b4f9
[AMDGPU][MC][GFX8] Added BUFFER_STORE_LDS_DWORD Instruction
...
See bug 36558: https://bugs.llvm.org/show_bug.cgi?id=36558
Differential Revision: https://reviews.llvm.org/D43950
Reviewers: artem.tamazov, arsenm
llvm-svn: 327299
2018-03-12 17:29:24 +00:00
Dmitry Preobrazhensky
da4a7c01bf
[AMDGPU][MC] Corrected GATHER4 opcodes
...
See bug 36252: https://bugs.llvm.org/show_bug.cgi?id=36252
Differential Revision: https://reviews.llvm.org/D43874
Reviewers: artem.tamazov, arsenm
llvm-svn: 327278
2018-03-12 15:03:34 +00:00
Stanislav Mekhanoshin
0f72225433
[AMDGPU] Add default ISA version targets
...
In case if -mattr used to modify feature set bits in llvm-mc call
getIsaVersion can fail to identify specific ISA due to test mismatch.
Adding default fallback tests which will always correctly report at
least major version.
Differential Revision: https://reviews.llvm.org/D44163
llvm-svn: 326825
2018-03-06 18:33:55 +00:00
Dmitry Preobrazhensky
d6e1a9404d
[AMDGPU][MC] Added lds support for MUBUF instructions
...
See bug 28234: https://bugs.llvm.org/show_bug.cgi?id=28234
Differential Revision: https://reviews.llvm.org/D43472
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 325676
2018-02-21 13:13:48 +00:00
Konstantin Zhuravlyov
331f97e171
AMDGPU: Bring processors and features in sync with the spec
...
- Remove gfx800
- Make iceland gfx802
- Add xnack to gfx902
Differential Revision: https://reviews.llvm.org/D43355
llvm-svn: 325393
2018-02-16 21:26:25 +00:00
Dmitry Preobrazhensky
0a1ff464e1
[AMDGPU][MC] Corrected dst/data size for MIMG opcodes with d16 modifier
...
See bug 36154: https://bugs.llvm.org/show_bug.cgi?id=36154
Differential Revision: https://reviews.llvm.org/D42847
Reviewers: cfang, artem.tamazov, arsenm
llvm-svn: 324237
2018-02-05 14:18:53 +00:00
Dmitry Preobrazhensky
e3271aee44
[AMDGPU][MC] Added validation of d16 and r128 modifiers of MIMG opcodes
...
See bugs 36094, 36095:
https://bugs.llvm.org/show_bug.cgi?id=36094
https://bugs.llvm.org/show_bug.cgi?id=36095
Differential Revision: https://reviews.llvm.org/D42692
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 324231
2018-02-05 12:45:43 +00:00
Dmitry Preobrazhensky
4f321aef74
[AMDGPU][MC] Corrected parsing of image opcode modifiers r128 and d16
...
See bugs 36092, 36093:
https://bugs.llvm.org/show_bug.cgi?id=36092
https://bugs.llvm.org/show_bug.cgi?id=36093
Differential Revision: https://reviews.llvm.org/D42583
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 323651
2018-01-29 14:20:42 +00:00
Dmitry Preobrazhensky
706828157f
[AMDGPU][MC] Added validation of image dst/data size (must match dmask and tfe)
...
See bug 36000: https://bugs.llvm.org/show_bug.cgi?id=36000
Differential Revision: https://reviews.llvm.org/D42483
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 323538
2018-01-26 16:42:51 +00:00
Dmitry Preobrazhensky
0b4eb1ead1
[AMDGPU][MC] Added support of 64-bit image atomics
...
See bug 35998: https://bugs.llvm.org/show_bug.cgi?id=35998
Differential Revision: https://reviews.llvm.org/D42469
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 323534
2018-01-26 15:43:29 +00:00
Dmitry Preobrazhensky
0e074e349d
[AMDGPU][MC] Corrected parsing of image modifiers and encoding of image atomics
...
See bugs
35962: https://bugs.llvm.org/show_bug.cgi?id=35962
35963: https://bugs.llvm.org/show_bug.cgi?id=35963
Differential Revision: https://reviews.llvm.org/D42184
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 322942
2018-01-19 13:49:53 +00:00
Dmitry Preobrazhensky
6b65f7c380
[AMDGPU][MC][GFX9] Enable inline constants for SDWA operands
...
See bug 35771: https://bugs.llvm.org/show_bug.cgi?id=35771
Differential Revision: https://reviews.llvm.org/D42058
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 322655
2018-01-17 14:00:48 +00:00
Stanislav Mekhanoshin
62875fcd6c
[AMDGPU] Add HW_REG_SH_MEM_BASES symbolic name for s_getreg_b32
...
Differential Revision: https://reviews.llvm.org/D41617
llvm-svn: 322500
2018-01-15 18:49:15 +00:00
Changpeng Fang
44dfa1de3b
AMDGPU/SI: Add d16 support for buffer intrinsics.
...
Differential Revision:
https://reviews.llvm.org/D38906
Reviewers:
Matt and Brian.
llvm-svn: 322402
2018-01-12 21:12:19 +00:00
Dmitry Preobrazhensky
3afbd825a3
[AMDGPU][MC][GFX8][GFX9] Added XNACK_MASK support
...
See bug 35764: https://bugs.llvm.org/show_bug.cgi?id=35764
Differential Revision: https://reviews.llvm.org/D41614
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 322189
2018-01-10 14:22:19 +00:00
Dmitry Preobrazhensky
414e05383f
[AMDGPU][MC] Incorrect parsing of flat/global atomic modifiers
...
See bug 35730: https://bugs.llvm.org/show_bug.cgi?id=35730
Differential Revision: https://reviews.llvm.org/D41598
Reviewers: vpykhtin, artem.tamazov, arsenm
llvm-svn: 321552
2017-12-29 13:55:11 +00:00