1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
3 // RUN: -x hip -emit-llvm-bc %s -o %t.hip.bc
4 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
5 // RUN: -mlink-bitcode-file %t.hip.bc -DHIP_PLATFORM -emit-llvm \
6 // RUN: %s -o - | FileCheck %s
8 #include "Inputs/cuda.h"
10 // CHECK: @_Z2g1i = constant ptr @_Z17__device_stub__g1i, align 8
12 __global__
void g1(int x
) {}
14 extern void g1(int x
);
16 // CHECK: call i32 @hipLaunchKernel{{.*}}@_Z2g1i
18 hipLaunchKernel((void*)g1
, 1, 1, nullptr, 0, 0);
21 // CHECK: __hipRegisterFunction{{.*}}@_Z2g1i