[PATCH] D101292: [AMDGPU] Restrict immediate scratch offsets
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 07:18:30 PDT 2021
sebastian-ne added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:7321
+ FlatVariant == SIInstrFlags::FlatScratch && Offset < 0 &&
+ (Offset % 4) != 0) {
+ return false;
----------------
foad wrote:
> Is 4 always the correct value to use here? Doesn't it depend on the size of the access?
It doesn’t depend on the size of the access. scratch_store_byte/short/dword/dwordx2/dwordx3/dwordx4 all behave the same.
So yes, 4 is always correct here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101292/new/
https://reviews.llvm.org/D101292
More information about the llvm-commits
mailing list