xref: /llvm-project/llvm/test/CodeGen/NVPTX/nofunc.ll (revision b279f6b098d3849f7f1c1f539b108307d5f8ae2d)
1; RUN: llc < %s -mtriple=nvptx -mcpu=sm_20 | FileCheck %s
2; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_20 | FileCheck %s
3; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -mtriple=nvptx -mcpu=sm_20 | %ptxas-verify %}
4; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
5
6; Test that we don't crash if we're compiling a module with function references,
7; but without any functions in it.
8
9target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
10target triple = "nvptx64-nvidia-cuda"
11
12@Funcs = local_unnamed_addr addrspace(1) externally_initialized
13         global [1 x ptr] [ptr @func], align 8
14
15declare void @func(ptr)
16
17; CHECK: Funcs[1] = {func}
18