This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Remove redundand check in the SILoadStoreOptimizer
ClosedPublic

Authored by rampitec on Feb 21 2022, 11:27 AM.

Diff Detail

Event Timeline

rampitec created this revision.Feb 21 2022, 11:27 AM
rampitec requested review of this revision.Feb 21 2022, 11:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2022, 11:27 AM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm added inline comments.Feb 21 2022, 11:42 AM
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
751

Losing the S_BUFFER_LOAD_IMM check is suspicious but I'm not sure why it was here in the first place

rampitec added inline comments.Feb 21 2022, 11:45 AM
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
751

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.

arsenm accepted this revision.Feb 21 2022, 2:45 PM
This revision is now accepted and ready to land.Feb 21 2022, 2:45 PM
This revision was landed with ongoing or failed builds.Feb 21 2022, 3:05 PM
This revision was automatically updated to reflect the committed changes.