[AMDGPU] Remove hardcoded address space value from AMDGPULibFunc
authorYaxun Liu <Yaxun.Liu@amd.com>
Sat, 4 Nov 2017 17:37:43 +0000 (17:37 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Sat, 4 Nov 2017 17:37:43 +0000 (17:37 +0000)
commit0d9673cff2955a21e7cd6d0623db464b90912d8b
treeee68bf80440f5cb1d1856ed83b1e743de2bfc993
parent4595a915f6d1e782e3e297eb611cbcac46af9bcb
[AMDGPU] Remove hardcoded address space value from AMDGPULibFunc

AMDGPULibFunc hardcodes address space values of the old address space mapping,
which causes invalid addrspacecast instructions and undefined functions in
APPSDK sample MonteCarloAsianDP.

This patch fixes that.

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

llvm-svn: 317409
llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
llvm/lib/Target/AMDGPU/AMDGPULibFunc.cpp
llvm/lib/Target/AMDGPU/AMDGPULibFunc.h
llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll