1 // RUN: %clang_cc1 -x hip -emit-llvm-bc %s -o %t.hip.bc 2 // RUN: %clang_cc1 -mlink-bitcode-file %t.hip.bc -DHIP_PLATFORM -emit-llvm \ 3 // RUN: %s -o - | FileCheck %s 4 5 #include "Inputs/cuda.h" 6 7 // CHECK: @_Z2g1i = constant void (i32)* @_Z17__device_stub__g1i, align 8 8 #if __HIP__ 9 __global__ void g1(int x) {} 10 #else 11 extern void g1(int x); 12 13 // CHECK: call i32 @hipLaunchKernel{{.*}}@_Z2g1i 14 void test() { 15 hipLaunchKernel((void*)g1, 1, 1, nullptr, 0, 0); 16 } 17 18 // CHECK: __hipRegisterFunction{{.*}}@_Z2g1i 19 #endif 20