This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Account for dmask when computing image mem size
ClosedPublic

Authored by arsenm on Jan 28 2020, 8:56 AM.

Details

Summary

Only the number of elements in the dmask will really be accessed.

Tests will be included in future GlobalISel patch.

Diff Detail

Event Timeline

arsenm created this revision.Jan 28 2020, 8:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2020, 8:57 AM

Adding David Stuttard as I think he worked on dmask originally.

nhaehnle accepted this revision.Jan 30 2020, 1:46 AM

The memory size of image loads is a bit of bizarre concept, but I assume this helps with the GlobalISel stuff, so sure.

LGTM, one stylistic nitpick.

llvm/lib/Target/AMDGPU/SIISelLowering.cpp
950–953

As a stylistic note, I think it's nicer to have braces around both sides of an if-else, if one side requires it.

This revision is now accepted and ready to land.Jan 30 2020, 1:46 AM