Fix APInt bit size in processDbgDeclares
authorYaxun Liu <Yaxun.Liu@amd.com>
Thu, 16 Nov 2017 02:54:49 +0000 (02:54 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Thu, 16 Nov 2017 02:54:49 +0000 (02:54 +0000)
commit4d9a4d7ac8c7f5f915bb53a46ad4d108d6ad5bea
treeb3c7b8684decd27b5ee23504e885a1b52375b497
parent396ed67950ce8559da1c7ea896a1cfe86fd3b27a
Fix APInt bit size in processDbgDeclares

processDbgDeclares assumes pointer size is the same for different addr spaces.
It uses pointer size for addr space 0 for all pointers, which causes assertion
in stripAndAccumulateInBoundsConstantOffsets for amdgcn---amdgiz since
pointer in addr space 5 has different size than in addr space 0.

This patch fixes that.

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

llvm-svn: 318370
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/test/CodeGen/AMDGPU/debugger-emit-prologue.ll
llvm/test/CodeGen/AMDGPU/debugger-insert-nops.ll
llvm/test/CodeGen/AMDGPU/debugger-reserve-regs.ll
llvm/test/CodeGen/AMDGPU/hsa-metadata-kernel-debug-props.ll