[PATCH] D39731: AMDGPU: Don't use MUBUF vaddr if address may overflow

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 05:41:53 PST 2017


arsenm created this revision.
Herald added subscribers: tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.

Effectively revert r263964. Before we would not
allow this if vaddr was not known to be positive.
Extend this by also using nuw to see if the
computation will do an unsigned overflow, which is
what the addressing mode doesn't really support.

This is a strange use of nuw, but I think it's correct if I understand the MUBUF restriction correctly.
I think the issue is the total overflow of vaddr+soffset+offset, but I think the soffset component can be ignored.


https://reviews.llvm.org/D39731

Files:
  lib/Target/AMDGPU/AMDGPU.td
  lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
  lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  lib/Target/AMDGPU/AMDGPUSubtarget.h
  lib/Target/AMDGPU/SIISelLowering.cpp
  lib/Target/AMDGPU/SIISelLowering.h
  test/CodeGen/AMDGPU/amdgpu.private-memory.ll
  test/CodeGen/AMDGPU/huge-private-buffer.ll
  test/CodeGen/AMDGPU/scratch-buffer.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39731.121880.patch
Type: text/x-patch
Size: 15261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171107/658015cb/attachment.bin>


More information about the llvm-commits mailing list