[PATCH] D120268: [AMDGPU] Remove redundand check in the SILoadStoreOptimizer
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 21 11:45:56 PST 2022
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:751
- CI.CPol == Paired.CPol &&
- (CI.InstClass == S_BUFFER_LOAD_IMM || CI.CPol == Paired.CPol);
}
----------------
arsenm wrote:
> Losing the S_BUFFER_LOAD_IMM check is suspicious but I'm not sure why it was here in the first place
`a && (b || a) == a` if I am not missing something.
I vaguely remember the history of this check. First it was comparing policy bits independently and s_buffer_load_imm did not have glc, so it was comparing with uninitialized memory. Then policy bits were combined into a single cpol operand and I guess the check was mechanically translated.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120268/new/
https://reviews.llvm.org/D120268
More information about the llvm-commits
mailing list