[NVPTX] Force minimum alignment of 4 for byval arguments of device-side functions.

Taking address of a byval variable in PTX is legal, but currently runs
into miscompilation by ptxas on sm_50+ (NVIDIA issue 1789042).
Work around the issue by enforcing minimum alignment on byval arguments
of device functions.

The change is a no-op on SASS level for sm_3x where ptxas already aligns
local copy by at least 4.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275893 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed