This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Check for pointer operand while refining LDS align
ClosedPublic

Authored by rampitec on Jun 23 2021, 10:23 AM.

Details

Summary

Also skips the propagation if alignment is 1.

Diff Detail

Event Timeline

rampitec created this revision.Jun 23 2021, 10:23 AM
rampitec requested review of this revision.Jun 23 2021, 10:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2021, 10:23 AM
Herald added a subscriber: wdng. · View Herald Transcript
foad added inline comments.Jun 23 2021, 11:05 AM
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
352–356

You look through bitcasts, so "Ptr" does not necessarily have pointer type, so you really do need this check.

rampitec added inline comments.Jun 23 2021, 11:07 AM
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
352–356

A bitcast cannot convert pointer to a non-pointer, and I am not handling ptrtoint.

foad added inline comments.Jun 23 2021, 11:13 AM
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
352–356

OK sorry, I missed that detail.

foad accepted this revision.Jun 23 2021, 11:59 AM
This revision is now accepted and ready to land.Jun 23 2021, 11:59 AM
This revision was landed with ongoing or failed builds.Jun 23 2021, 12:28 PM
This revision was automatically updated to reflect the committed changes.