Cap the alignment to 128 bytes as that is the maximum alignment supported by PTX. The restriction is mentioned in the parameter passing section (Note D) of the [PTX Writer's Guide to Interoperability] (https://docs.nvidia.com/cuda/ptx-writers-guide-to-interoperability/index.html#parameter-passing) > D. The alignment must be 1, 2, 4, 8, 16, 32, 64, or 128 bytes.
15 lines
392 B
LLVM
15 lines
392 B
LLVM
; RUN: llc < %s -march=nvptx64 -O0 | FileCheck %s
|
|
; RUN: %if ptxas %{ llc < %s -march=nvptx64 -O0 | %ptxas-verify %}
|
|
|
|
|
|
; CHECK: .visible .func (.param .align 128 .b8 func_retval0[256]) repro()
|
|
define <64 x i32> @repro() {
|
|
|
|
; CHECK: .param .align 128 .b8 retval0[256];
|
|
%1 = tail call <64 x i32> @test(i32 0)
|
|
ret <64 x i32> %1
|
|
}
|
|
|
|
; Function Attrs: nounwind
|
|
declare <64 x i32> @test(i32)
|