1 // Check CUID generated by hash.
2 // The same CUID is generated for the same file with the same options.
4 // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu --no-offload-new-driver \
5 // RUN: --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \
6 // RUN: %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1
8 // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu --no-offload-new-driver \
9 // RUN: --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \
10 // RUN: %S/Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1
12 // RUN: FileCheck %s -check-prefixes=SAME -input-file %t.out
14 // Check CUID generated by hash.
15 // Different CUID's are generated for the same file with different options.
17 // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=1 --no-offload-new-driver \
18 // RUN: --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \
19 // RUN: %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1
21 // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=2 --no-offload-new-driver \
22 // RUN: --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \
23 // RUN: %S/Inputs/../Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1
25 // RUN: FileCheck %s -check-prefixes=DIFF -input-file %t.out
27 // SAME: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID:[0-9a-f]+]]"
28 // SAME: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID]]"
30 // DIFF: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID:[0-9a-f]+]]"
31 // DIFF-NOT: "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID]]"