This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GISel] Fix MMO for raw/struct buffer access with non-constant offset
ClosedPublic

Authored by foad on Jul 21 2021, 8:39 AM.

Details

Summary

Codegen for the raw/struct buffer access intrinsics would update the
offset in the MMO to reflect the combined offset, if it was known to be
constant. If the combined offset was not known to be constant, or if
there was an index, it would set the offset in the MMO to 0. This is
unsafe because it makes it look like the access does not alias with
another access with a fixed non-zero offset.

Fix these cases by setting the pointer in the MMO to null, to reflect
the fact that we do not have any known IR value pointer + constant
offset for the access.

D106284 did this for SelectionDAG. This is the corresponding fix for
GlobalISel.

Diff Detail

Event Timeline

foad created this revision.Jul 21 2021, 8:39 AM
foad requested review of this revision.Jul 21 2021, 8:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2021, 8:39 AM
This revision is now accepted and ready to land.Jul 21 2021, 1:22 PM
This revision was landed with ongoing or failed builds.Jul 26 2021, 6:28 AM
This revision was automatically updated to reflect the committed changes.