Files
clang-p2996/llvm/test/CodeGen/AMDGPU
Nicolai Haehnle 7a9c03f484 AMDGPU: Select MIMG instructions manually in SITargetLowering
Summary:
Having TableGen patterns for image intrinsics is hitting limitations:
for D16 we already have to manually pre-lower the packing of data
values, and we will have to do the same for A16 eventually.

Since there is already some custom C++ code anyway, it is arguably easier
to just do everything in C++, now that we can use the beefed-up generic
tables backend of TableGen to provide all the required metadata and map
intrinsics to corresponding opcodes. With this approach, all image
intrinsic lowering happens in SITargetLowering::lowerImage. That code is
dense due to all the cases that it handles, but it should still be easier
to follow than what we had before, by virtue of it all being done in a
single location, and by virtue of not relying on the TableGen pattern
magic that very few people really understand.

This means that we will have MachineSDNodes with MIMG instructions
during DAG combining, but that seems alright: previously we had
intrinsic nodes instead, but those are similarly opaque to the generic
CodeGen infrastructure, and the final pattern matching just did a 1:1
translation to machine instructions anyway. If anything, the fact that
we now merge the address words into a vector before DAG combine should
be an advantage.

Change-Id: I417f26bd88f54ce9781c1668acc01f3f99774de6

Reviewers: arsenm, rampitec, rtaylor, tstellar

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D48017

llvm-svn: 335228
2018-06-21 13:36:57 +00:00
..
2018-05-29 19:35:53 +00:00
2017-08-07 18:30:35 +00:00
2017-11-15 21:51:43 +00:00
2018-03-02 02:50:22 +00:00
2017-11-15 21:51:43 +00:00
2018-06-12 18:02:46 +00:00
2017-08-07 18:30:35 +00:00
2018-06-15 15:15:46 +00:00
2018-04-30 19:08:16 +00:00
2018-05-22 06:32:10 +00:00
2018-05-22 06:32:10 +00:00
2017-08-07 18:30:35 +00:00
2018-04-30 19:08:16 +00:00
2017-08-07 18:30:35 +00:00
2018-06-15 15:15:46 +00:00
2017-07-14 00:11:13 +00:00
2018-03-21 19:31:53 +00:00
2017-08-07 18:30:35 +00:00
2017-09-20 04:25:58 +00:00
2017-11-28 23:40:12 +00:00
2018-06-15 15:15:46 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2018-06-15 15:15:46 +00:00
2018-04-30 19:08:16 +00:00
2018-06-15 15:15:46 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2018-05-07 13:21:26 +00:00
2017-08-07 14:58:04 +00:00
2017-08-07 18:30:35 +00:00

+==============================================================================+
| How to organize the lit tests                                                |
+==============================================================================+

- If you write a test for matching a single DAG opcode or intrinsic, it should
  go in a file called {opcode_name,intrinsic_name}.ll (e.g. fadd.ll)

- If you write a test that matches several DAG opcodes and checks for a single
  ISA instruction, then that test should go in a file called {ISA_name}.ll (e.g.
  bfi_int.ll

- For all other tests, use your best judgement for organizing tests and naming
  the files.

+==============================================================================+
| Naming conventions                                                           |
+==============================================================================+

- Use dash '-' and not underscore '_' to separate words in file names, unless
  the file is named after a DAG opcode or ISA instruction that has an
  underscore '_' in its name.