[PATCH] D42885: [AMDGPU] intrintrics for byte/short load/store
Ryan Taylor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 22 07:30:20 PST 2019
rtaylor added inline comments.
================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:5642-5650
+ // set node opcode if buffer_load_byte/short
+ if (Op.hasOneUse()) {
+ if (M->use_begin()->getOpcode() == ISD::SIGN_EXTEND) {
+ if (LoadVT.getScalarType() == MVT::i8)
+ Opc = AMDGPUISD::BUFFER_LOAD_BYTE;
+ else
+ Opc = AMDGPUISD::BUFFER_LOAD_SHORT;
----------------
arsenm wrote:
> You shouldn't be inspecting the users. You can just unconditionally use one or the other. You're going to have to insert a truncate back to the original type at the end anyway. You can then add a separate optimization to fold in the sext_inreg or mask into the buffer like is done for loads
There are four potential options so what do you mean by one or the other? There is BUFFER_LOAD_ubyte/ushort/short/byte for the Opc.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D42885/new/
https://reviews.llvm.org/D42885
More information about the llvm-commits
mailing list