2019-02-01 05:34:03 +08:00
|
|
|
// RUN: %clang_cc1 -target-sdk-version=8.0 -emit-llvm %s -o - \
|
|
|
|
// RUN: | FileCheck %s --check-prefixes=CUDA-OLD,CHECK
|
|
|
|
// RUN: %clang_cc1 -target-sdk-version=9.2 -emit-llvm %s -o - \
|
|
|
|
// RUN: | FileCheck %s --check-prefixes=CUDA-NEW,CHECK
|
|
|
|
// RUN: %clang_cc1 -x hip -emit-llvm %s -o - \
|
|
|
|
// RUN: | FileCheck %s --check-prefixes=HIP,CHECK
|
2018-04-25 09:10:37 +08:00
|
|
|
|
2011-10-07 02:29:37 +08:00
|
|
|
|
2014-04-29 06:21:28 +08:00
|
|
|
#include "Inputs/cuda.h"
|
2011-10-07 02:29:37 +08:00
|
|
|
|
2018-04-25 21:07:58 +08:00
|
|
|
// CHECK-LABEL: define{{.*}}g1
|
2018-04-25 09:10:37 +08:00
|
|
|
// HIP: call{{.*}}hipSetupArgument
|
|
|
|
// HIP: call{{.*}}hipLaunchByPtr
|
2019-02-01 05:34:03 +08:00
|
|
|
// CUDA-OLD: call{{.*}}cudaSetupArgument
|
|
|
|
// CUDA-OLD: call{{.*}}cudaLaunch
|
|
|
|
// CUDA-NEW: call{{.*}}__cudaPopCallConfiguration
|
|
|
|
// CUDA-NEW: call{{.*}}cudaLaunchKernel
|
2011-10-07 02:29:37 +08:00
|
|
|
__global__ void g1(int x) {}
|
|
|
|
|
2018-04-25 21:07:58 +08:00
|
|
|
// CHECK-LABEL: define{{.*}}main
|
2011-10-07 02:29:37 +08:00
|
|
|
int main(void) {
|
2018-04-25 09:10:37 +08:00
|
|
|
// HIP: call{{.*}}hipConfigureCall
|
2019-02-01 05:34:03 +08:00
|
|
|
// CUDA-OLD: call{{.*}}cudaConfigureCall
|
|
|
|
// CUDA-NEW: call{{.*}}__cudaPushCallConfiguration
|
2011-10-07 02:29:37 +08:00
|
|
|
// CHECK: icmp
|
|
|
|
// CHECK: br
|
|
|
|
// CHECK: call{{.*}}g1
|
|
|
|
g1<<<1, 1>>>(42);
|
|
|
|
}
|