This is an archive of the discontinued LLVM Phabricator instance.

AMDPGU/SI: Negative offsets aren't allowed in MUBUF's vaddr operand
ClosedPublic

Authored by tstellarAMD on Jul 15 2015, 10:21 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellarAMD retitled this revision from to AMDPGU/SI: Negative offsets aren't allowed in MUBUF's vaddr operand.
tstellarAMD updated this object.
tstellarAMD added a reviewer: arsenm.
tstellarAMD added a subscriber: llvm-commits.
arsenm accepted this revision.Jul 15 2015, 10:48 AM
arsenm edited edge metadata.

LGTM

test/CodeGen/AMDGPU/scratch-buffer.ll
101–102 ↗(On Diff #29792)

I still don't really understand how this becomes a negative offset. Would another test that adds a negative offset be useful?

This revision is now accepted and ready to land.Jul 15 2015, 10:48 AM
test/CodeGen/AMDGPU/scratch-buffer.ll
101–102 ↗(On Diff #29792)

Negative immediate offsets don't trigger the bug, because only unsigned immediates get folded into the MUBUF instruction. The bug occurs when %offset is negative and it is passed to the vaddr operand.

This revision was automatically updated to reflect the committed changes.