[AMDGPU] Fix codegen of image intrinsics for g16 and a16
authorDavid Stuttard <david.stuttard@amd.com>
Fri, 7 May 2021 10:43:29 +0000 (11:43 +0100)
committerDavid Stuttard <david.stuttard@amd.com>
Fri, 14 May 2021 08:28:15 +0000 (09:28 +0100)
commit31b62aa162b464efadef942a801706127dd8a443
treedcc236abd5ddf1ba8e84750437aa3770701ade45
parent72d570ca085c809edd70d355cad7129092afbf90
[AMDGPU] Fix codegen of image intrinsics for g16 and a16

For gfx10 gradient (g16) and address (a16) can be independent. Previous
implementation assumed that a16 implied g16.

There are some other changes that fix the verification (as well as asm/disasm)
that are required for the included test to pass - the XFAIL will be removed in
those changes.

This also includes required fixes for GlobalISel

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

Change-Id: I7d171cc90994de05f41669b66a6d0ffa2ed05d09
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.a16.dim.ll
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.g16.a16.dim.ll [new file with mode: 0644]