[Clang][Driver] Fix `--save-temps` for OpenCL AoT compilation (#78333)
[llvm-project.git] / clang / test / Driver / opencl_aot_save_temps.cl
blob7b3149871f8fc2c467addd5135d12f1649ba2455
1 // RUN: %clang -x cl --save-temps -c -### %s 2>&1 | FileCheck %s
2 // RUN: %clang -x cl -ccc-print-phases -c %s 2>&1 | FileCheck %s -check-prefix=CHECK-PHASES
4 // CHECK: "-o" "[[CLI_NAME:.+]].cli" "-x" "cl"
5 // CHECK-NEXT: "-o" "[[CLI_NAME]].bc" "-x" "cl-cpp-output"{{.*}}"[[CLI_NAME:.+]].cli"
7 // CHECK-PHASES: 0: input, {{.*}}, cl
8 // CHECK-PHASES: 1: preprocessor, {0}, cl-cpp-output
9 // CHECK-PHASES: 2: compiler, {1}, ir
11 uint3 add(uint3 a, uint3 b) {
12 ulong x = a.x + (ulong)b.x;
13 ulong y = a.y + (ulong)b.y + (x >> 32);
14 uint z = a.z + b.z + (y >> 32);
15 return (uint3)(x, y, z);