diff options
Diffstat (limited to 'test/CodeGenCUDA/kernel-args-alignment.cu')
-rw-r--r-- | test/CodeGenCUDA/kernel-args-alignment.cu | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/CodeGenCUDA/kernel-args-alignment.cu b/test/CodeGenCUDA/kernel-args-alignment.cu index 4bd5eb1bb1..653f3eb23d 100644 --- a/test/CodeGenCUDA/kernel-args-alignment.cu +++ b/test/CodeGenCUDA/kernel-args-alignment.cu @@ -1,8 +1,12 @@ -// RUN: %clang_cc1 --std=c++11 -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | \ -// RUN: FileCheck -check-prefix HOST -check-prefix CHECK %s +// New CUDA kernel launch sequence does not require explicit specification of +// size/offset for each argument, so only the old way is tested. +// +// RUN: %clang_cc1 --std=c++11 -triple x86_64-unknown-linux-gnu -emit-llvm \ +// RUN: -target-sdk-version=8.0 -o - %s \ +// RUN: | FileCheck -check-prefixes=HOST-OLD,CHECK %s // RUN: %clang_cc1 --std=c++11 -fcuda-is-device -triple nvptx64-nvidia-cuda \ -// RUN: -emit-llvm -o - %s | FileCheck -check-prefix DEVICE -check-prefix CHECK %s +// RUN: -emit-llvm -o - %s | FileCheck -check-prefixes=DEVICE,CHECK %s #include "Inputs/cuda.h" @@ -27,9 +31,9 @@ static_assert(alignof(S) == 8, "Unexpected alignment."); // 1. offset 0, width 1 // 2. offset 8 (because alignof(S) == 8), width 16 // 3. offset 24, width 8 -// HOST: call i32 @cudaSetupArgument({{[^,]*}}, i64 1, i64 0) -// HOST: call i32 @cudaSetupArgument({{[^,]*}}, i64 16, i64 8) -// HOST: call i32 @cudaSetupArgument({{[^,]*}}, i64 8, i64 24) +// HOST-OLD: call i32 @cudaSetupArgument({{[^,]*}}, i64 1, i64 0) +// HOST-OLD: call i32 @cudaSetupArgument({{[^,]*}}, i64 16, i64 8) +// HOST-OLD: call i32 @cudaSetupArgument({{[^,]*}}, i64 8, i64 24) // DEVICE-LABEL: @_Z6kernelc1SPi // DEVICE-SAME: i8{{[^,]*}}, %struct.S* byval align 8{{[^,]*}}, i32* |