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 7 8 #include "Inputs/cuda.h" 9 10 // CHECK: @_Z2g1i = constant void (i32)* @_Z17__device_stub__g1i, align 8 11 #if __HIP__ 12 __global__ void g1(int x) {} 13 #else 14 extern void g1(int x); 15 16 // CHECK: call i32 @hipLaunchKernel{{.*}}@_Z2g1i 17 void test() { 18 hipLaunchKernel((void*)g1, 1, 1, nullptr, 0, 0); 19 } 20 21 // CHECK: __hipRegisterFunction{{.*}}@_Z2g1i 22 #endif 23