[AMDGPU] Simplify GEP construction (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 8 Jul 2021 19:13:52 +0000 (21:13 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 8 Jul 2021 19:21:43 +0000 (21:21 +0200)
commit9e225a2a71ce43cb74283d3bcf8c9d1eb7c30bd4
tree60e93a82a6cf435599dcedcbd0de1a79758c1357
parentcfb94212d49a1a28208b09bb7d80b86956854b4b
[AMDGPU] Simplify GEP construction (NFC)

Noticed while making a related change. This code was doing
something really peculiar: Creating an APInt by parsing a string.
And then creating a SmallVector with one element to create the
GEP.

Instead create the APInt from integers and directly pass the single
index to GetElementPtrInst::Create().
llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp