This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Ensure flat loads are broken into dword in functions
ClosedPublic

Authored by arsenm on Feb 3 2023, 5:47 AM.

Details

Reviewers
rampitec
Pierre-vh
foad
Group Reviewers
Restricted Project
Summary

We were assuming we could rely on the flat scratch init detection
to imply if there are possible flat addressed stack objects, which
doesn't work outside of a kernel. We should have a way to prove
if a given flat access can't access the stack.

We could use a not-stack parameter attribute to avoid
these splits.

Make the minimally correct change for GlobalISel; I'll address
this better in my larger patch to rewrite load and store legalization.

Fixes: SWDEV-218237

Diff Detail

Event Timeline

arsenm created this revision.Feb 3 2023, 5:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2023, 5:47 AM
arsenm requested review of this revision.Feb 3 2023, 5:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2023, 5:47 AM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec accepted this revision.Feb 3 2023, 11:23 AM

LGTM, thanks!

This revision is now accepted and ready to land.Feb 3 2023, 11:23 AM
arsenm closed this revision.Feb 5 2023, 1:26 AM

dcd0a67f209c8037c08c583215da23a84f49b8d5

foad added inline comments.Feb 6 2023, 1:50 AM
llvm/test/CodeGen/AMDGPU/flat-address-space.ll
156

Sounds like you have fixed this?