brintos

brintos / llvm-project-archived public Read only

0
0
Text · 624 B · 653e03c Raw
23 lines · cpp
1// REQUIRES: x86-registered-target2// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \3// RUN:   -x hip -emit-llvm-bc %s -o %t.hip.bc4// 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 %s7 8#include "Inputs/cuda.h"9 10// CHECK: @_Z2g1i = constant ptr @_Z17__device_stub__g1i, align 811#if __HIP__12__global__ void g1(int x) {}13#else14extern void g1(int x);15 16// CHECK: call i32 @hipLaunchKernel{{.*}}@_Z2g1i17void test() {18  hipLaunchKernel((void*)g1, 1, 1, nullptr, 0, 0);19}20 21// CHECK: __hipRegisterFunction{{.*}}@_Z2g1i22#endif23