[PATCH] D91336: AMDGPU/GlobalISel: Fix negative offset folding for buffer_load
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 18 06:39:56 PST 2020
Petar.Avramovic added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:1375
// Handle the variable sgpr + vgpr case.
+ MachineInstr *Add = getOpcodeDef(AMDGPU::G_ADD, CombinedOffset, *MRI);
----------------
foad wrote:
> The DAG version of setBufferOffsets doesn't have this case. Is it done later on when the register classes are known?
SDAG just gives up and uses add as base (1 extra instruction compared to what global-isel does). See `@s_buffer_load_f32_offset_add_vgpr_sgpr` in `GlobalISel/llvm.amdgcn.s.buffer.load.ll` for example.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91336/new/
https://reviews.llvm.org/D91336
More information about the llvm-commits
mailing list