llvm-project/llvm/test/CodeGen
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
..
AArch64 [AArch64] Implement FLT_ROUNDS macro. 2018-06-20 12:09:01 +00:00
AMDGPU AMDGPU: Select MIMG instructions manually in SITargetLowering 2018-06-21 13:36:57 +00:00
ARC
ARM [DAGCombine] Fix alignment for offset loads/stores 2018-06-21 08:30:07 +00:00
AVR [AVR] Set trackLivenessAfterRegAlloc 2018-06-11 14:46:48 +00:00
BPF [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
Generic [DWARFv5] Tolerate files not all having an MD5 checksum. 2018-06-14 13:38:20 +00:00
Hexagon [Hexagon] Replace .ll test for expanding post-ra pesudos with .mir 2018-06-20 19:22:27 +00:00
Inputs
Lanai Remove SETCCE use from Lanai's backend 2018-06-03 12:56:24 +00:00
MIR [DebugInfo] Make sure all DBG_VALUEs' reguse operands have IsDebug property 2018-06-21 10:03:34 +00:00
MSP430 Emit a left-shift instead of a power-of-two multiply for jump-tables 2018-05-16 08:58:26 +00:00
Mips [mips] Add microMIPS specific addressing patterns. 2018-06-20 22:40:12 +00:00
NVPTX [DAG] fold FP binops with undef operands to NaN 2018-05-21 23:54:19 +00:00
Nios2
PowerPC [DebugInfo] Make sure all DBG_VALUEs' reguse operands have IsDebug property 2018-06-21 10:03:34 +00:00
RISCV [RISC-V] Fix a test case to not include label names as those aren't 2018-06-21 05:42:05 +00:00
SPARC [Sparc] Add support for 13-bit PIC 2018-06-11 05:50:08 +00:00
SystemZ [BranchFolding] Fix live-in's when hoisting code 2018-06-07 07:20:33 +00:00
Thumb [ARM] Testcase for Thumb1 cmp with constants. 2018-06-19 00:12:13 +00:00
Thumb2 Generalize MergeBlockIntoPredecessor. Replace uses of MergeBasicBlockIntoOnlyPred. 2018-06-20 22:01:04 +00:00
WebAssembly [WebAssembly] Fix liveness tracking info after drop insertion 2018-06-19 20:30:42 +00:00
WinCFGuard
WinEH [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
X86 [DebugInfo] Make sure all DBG_VALUEs' reguse operands have IsDebug property 2018-06-21 10:03:34 +00:00
XCore [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00