This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Legalize TFE image result loads
ClosedPublic

Authored by arsenm on Jan 26 2020, 7:51 PM.

Details

Reviewers
nhaehnle
kerbowa
Summary

Rewrite the result register pair into the expected sinigle register
format in the legalizer.

I'm also operating under the assumption that TFE doesn't apply to
stores or atomics, but don't know if this is true or not.

Diff Detail

Event Timeline

arsenm created this revision.Jan 26 2020, 7:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2020, 7:51 PM

Correct, TFE does not apply to store or atomic. Stores or atomics to unmapped partially-resident images will simply be ignored by the hardware (and atomic return values are undefined).

Do all cases still work in terms of how the intended semantics for the (super ugly) unpacked f16 case are represented? It seems a bit fragile.

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
2928–2929

This doesn't need to be moved.

Correct, TFE does not apply to store or atomic. Stores or atomics to unmapped partially-resident images will simply be ignored by the hardware (and atomic return values are undefined).

Do all cases still work in terms of how the intended semantics for the (super ugly) unpacked f16 case are represented? It seems a bit fragile.

I think so. In the unpacked f16 case, this will load in a way that looks identical to f32, except with the truncates after to the natural packed type

arsenm updated this revision to Diff 240656.Jan 27 2020, 12:35 PM

Don't move atomic check

arsenm updated this revision to Diff 242450.Feb 4 2020, 3:55 PM

Call observer

nhaehnle accepted this revision.Feb 5 2020, 8:58 AM

LGTM

This revision is now accepted and ready to land.Feb 5 2020, 8:58 AM