Files
clang-p2996/llvm/test/CodeGen/NVPTX/alias-errors.ll
Joseph Huber f4381d4644 [NVPTX] Add initial support for '.alias' in PTX
This patch adds initial support for using aliases when targeting PTX. We
perform a pretty strict conversion from the globals referenced to the
expected output. as described in the PTX documentation at
https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#kernel-and-function-directives-alias

These cannot currently be used due to a bug in the `nvlink`
implementation that causes aliases to pruned functions to crash the
linker.

Reviewed By: tra

Differential Revision: https://reviews.llvm.org/D155211
2023-07-21 16:43:46 -05:00

10 lines
496 B
LLVM

; RUN: not --crash llc < %s -march=nvptx64 -mcpu=sm_30 -mattr=+ptx43 2>&1 | FileCheck %s --check-prefix=ATTR
; RUN: not --crash llc < %s -march=nvptx64 -mcpu=sm_20 -mattr=+ptx63 2>&1 | FileCheck %s --check-prefix=ATTR
; RUN: not --crash llc < %s -march=nvptx64 -mcpu=sm_30 -mattr=+ptx63 2>&1 | FileCheck %s --check-prefix=ALIAS
; ATTR: .alias requires PTX version >= 6.3 and sm_30
; ALIAS: NVPTX aliasee must be a non-kernel function
@a = global i32 42, align 8
@b = internal alias i32, ptr @a