This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] getMemOperandsWithOffset: add vaddr operand for stack access BUF instructions
ClosedPublic

Authored by foad on Feb 4 2020, 5:31 AM.

Details

Summary

A consequence is that checkInstOffsetsDoNotOverlap can now distinguish
sp+offset from fp+offset, so it knows that it shouldn't try to work out
whether the accesses overlap just by comparing the offsets. For example
in these two instructions:

MIR:
BUFFER_STORE_DWORD_OFFSET %0:vgpr_32(s32), $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 4, 0, 0, 0, 0, 0, implicit $exec :: (dereferenceable store 4 into stack + 4, addrspace 5)
%4:vgpr_32 = BUFFER_LOAD_DWORD_OFFEN %stack.0.alloca, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr32, 0, 0, 0, 0, 0, 0, implicit $exec :: (load 4 from i8 addrspace(5)* undef, addrspace 5)

ISA:
buffer_store_dword v0, off, s[0:3], s32 offset:4
buffer_load_dword v0, off, s[0:3], s34

Depends on D72392.

Diff Detail

Event Timeline

foad created this revision.Feb 4 2020, 5:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2020, 5:31 AM

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: diff.json, console-log.txt

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

arsenm added a comment.Feb 4 2020, 9:07 AM

Is there a way to test this?

reverse ping

foad updated this revision to Diff 345081.May 13 2021, 3:52 AM

Rebase.

arsenm accepted this revision.May 13 2021, 6:18 AM

LGTM

This revision is now accepted and ready to land.May 13 2021, 6:18 AM
This revision was landed with ongoing or failed builds.May 14 2021, 2:12 AM
This revision was automatically updated to reflect the committed changes.