[PATCH] D26747: AMDGPU: Fix legalization of MUBUF instructions in shaders

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 07:04:47 PST 2016


nhaehnle created this revision.
nhaehnle added reviewers: arsenm, tstellarAMD.
nhaehnle added a subscriber: llvm-commits.
Herald added subscribers: tony-tye, yaxunl, wdng, kzhuravl.

The addr64-based legalization is incorrect for MUBUF instructions with idxen
set as well as for BUFFER_LOAD/STORE_FORMAT_* instructions.  This affects
e.g.  shaders that access buffer textures.

Since we never actually need the addr64-legalization in shaders, this patch
takes the easy route and keys off the calling convention.  If this ever
affects (non-OpenGL) compute, the type of legalization needs to be chosen
based on some TSFlag.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98664


https://reviews.llvm.org/D26747

Files:
  lib/Target/AMDGPU/SIInstrInfo.cpp
  test/CodeGen/AMDGPU/mubuf-shader-vgpr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26747.78185.patch
Type: text/x-patch
Size: 4311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161116/da5e83e9/attachment.bin>


More information about the llvm-commits mailing list