This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix emitting multiple stack loads for stack passed workitems
ClosedPublic

Authored by arsenm on Sep 5 2019, 11:42 AM.

Details

Reviewers
rampitec
Summary

The same stack is loaded for each workitem ID, and each use. Nothing
prevents you from creating multiple fixed stack objects with the same
offsets, so this was creating a load for each unique frame index,
despite them being the same offset. Re-use the same frame index so the
loads are CSEable.

Diff Detail

Event Timeline

arsenm created this revision.Sep 5 2019, 11:42 AM
This revision is now accepted and ready to land.Sep 5 2019, 12:32 PM
arsenm closed this revision.Sep 5 2019, 4:38 PM

r371148