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 - \
|
2019-09-25 03:16:40 +08:00
|
|
|
// RUN: | FileCheck %s --check-prefixes=HIP-OLD,CHECK
|
|
|
|
// RUN: %clang_cc1 -fhip-new-launch-api -x hip -emit-llvm %s -o - \
|
|
|
|
// RUN: | FileCheck %s --check-prefixes=HIP-NEW,CHECK
|
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
|
2019-09-25 03:16:40 +08:00
|
|
|
// HIP-OLD: call{{.*}}hipSetupArgument
|
|
|
|
// HIP-OLD: call{{.*}}hipLaunchByPtr
|
|
|
|
// HIP-NEW: call{{.*}}__hipPopCallConfiguration
|
|
|
|
// HIP-NEW: call{{.*}}hipLaunchKernel
|
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) {
|
2019-09-25 03:16:40 +08:00
|
|
|
// HIP-OLD: call{{.*}}hipConfigureCall
|
|
|
|
// HIP-NEW: call{{.*}}__hipPushCallConfiguration
|
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);
|
|
|
|
}
|