mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 19:45:40 -04:00

Add .stub to kernel stub function name so that it is different from kernel name in device code. This is necessary to let debugger find correct symbol for kernel. Differential Revision: https://reviews.llvm.org/D58518 llvm-svn: 354948
21 lines
664 B
Plaintext
21 lines
664 B
Plaintext
// RUN: echo "GPU binary would be here" > %t
|
|
|
|
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \
|
|
// RUN: -fcuda-include-gpubinary %t -o - -x hip\
|
|
// RUN: | FileCheck -allow-deprecated-dag-overlap %s --check-prefixes=CHECK
|
|
|
|
#include "Inputs/cuda.h"
|
|
|
|
template<class T>
|
|
__global__ void kernelfunc() {}
|
|
|
|
// CHECK-LABEL: define{{.*}}@_Z8hostfuncv()
|
|
// CHECK: call void @[[STUB:_Z10kernelfuncIiEvv.stub]]()
|
|
void hostfunc(void) { kernelfunc<int><<<1, 1>>>(); }
|
|
|
|
// CHECK: define{{.*}}@[[STUB]]
|
|
// CHECK: call{{.*}}@hipLaunchByPtr{{.*}}@[[STUB]]
|
|
|
|
// CHECK-LABEL: define{{.*}}@__hip_register_globals
|
|
// CHECK: call{{.*}}@__hipRegisterFunction{{.*}}@[[STUB]]
|