Files
clang-p2996/llvm/test/CodeGen/NVPTX/max-align.ll
Alex MacLean 5c9513ac75 [NVPTX] cap param alignment at 128 (max supported by ptx) (#96117)
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.
2024-06-25 10:04:45 -07:00

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)