[NVPTX] Fix integer overflow affecting array size calculation.
authorArtem Belevich <tra@google.com>
Thu, 23 Mar 2023 22:27:02 +0000 (15:27 -0700)
committerArtem Belevich <tra@google.com>
Fri, 24 Mar 2023 17:35:25 +0000 (10:35 -0700)
commit6a423ee34447f29384fa6b8d7943809f2a8267d2
tree7aeac29646ac4fa0a46e3a76aef17e0aff0daf49
parentf23ea4cbd443601a0d6666a5fae6558243051348
[NVPTX] Fix integer overflow affecting array size calculation.

It turns out, 4GB+ large arrays are a thing and a 32-bit integer is just not
enough to handle them.

Differential Revision: https://reviews.llvm.org/D146767
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
llvm/test/CodeGen/NVPTX/global-variable-big.ll