[AMDGPU] Improve the lowering of raw_buffer_load_{i8,i16} and struct_buffer_load_...
authorKonstantina Mitropoulou <Konstantina.Mitropoulou@amd.com>
Fri, 17 Feb 2023 22:16:39 +0000 (14:16 -0800)
committerKonstantina Mitropoulou <Konstantina.Mitropoulou@amd.com>
Wed, 22 Feb 2023 17:01:33 +0000 (09:01 -0800)
commit944f429b210d0d94171dc5df3068d4f1e8fb5d80
tree17058226214420364419cd804681988f94f0c571
parent3e48c8d75d1ca937ab3595909fb4198226c4ad1d
[AMDGPU] Improve the lowering of raw_buffer_load_{i8,i16} and struct_buffer_load_{i8,i16} intrinsics

Currently, raw_buffer_load_{i8,i16} and struct_buffer_load_{i8,i16}
intrinsics are lowered as buffer_load_{u8,u16}. This patch combines
buffer_load_{u8,u16} and sign extension instructions in order to
generate buffer_load_{i8,i16} instructions.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D144313
llvm/lib/Target/AMDGPU/AMDGPUCombine.td
llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.raw.buffer.load.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.struct.buffer.load.ll