Page MenuHomePhabricator

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

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



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:

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)

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?