]> granicus.if.org Git - llvm/commit
AMDGPU: Fix legalization of MUBUF instructions in shaders
authorNicolai Haehnle <nhaehnle@gmail.com>
Fri, 18 Nov 2016 11:55:52 +0000 (11:55 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Fri, 18 Nov 2016 11:55:52 +0000 (11:55 +0000)
commit1e27a618c61dc52e1a9926c56de0ec5cbf9935e0
tree886a96de9b9a60d29572223f56a60419320b0279
parent546b063ba52c8b66c4f9852abb93a0b94fedbc48
AMDGPU: Fix legalization of MUBUF instructions in shaders

Summary:
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

Reviewers: arsenm, tstellarAMD

Subscribers: kzhuravl, wdng, yaxunl, tony-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D26747

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287339 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIInstrInfo.cpp
test/CodeGen/AMDGPU/mubuf-shader-vgpr.ll [new file with mode: 0644]