brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · a4167d6 Raw
39 lines · plain
1// Check CUID generated by hash.2// The same CUID is generated for the same file with the same options.3 4// This test requires relative paths for input files. Since the test may be5// done out of source tree, create the local directory structure and copy the6// input file from the source tree into that directory.7// RUN: mkdir -p %t/Inputs/hip_multiple_inputs8// RUN: cp %S/Inputs/hip_multiple_inputs/a.cu %t/Inputs/hip_multiple_inputs/a.cu9// RUN: cd %t10 11// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu --no-offload-new-driver \12// RUN:   --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \13// RUN:   Inputs/hip_multiple_inputs/a.cu >%t.out 2>&114 15// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu --no-offload-new-driver \16// RUN:   --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \17// RUN:   Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&118 19// RUN: FileCheck %s -check-prefixes=SAME -input-file %t.out20 21// Check CUID generated by hash.22// Different CUID's are generated for the same file with different options.23 24// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=1 --no-offload-new-driver \25// RUN:   --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \26// RUN:   Inputs/hip_multiple_inputs/a.cu >%t.out 2>&127 28// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=2 --no-offload-new-driver \29// RUN:   --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \30// RUN:   Inputs/../Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&131 32// RUN: FileCheck %s -check-prefixes=DIFF -input-file %t.out33 34// SAME: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID:[0-9a-f]+]]"35// SAME: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID]]"36 37// DIFF: "-cc1"{{.*}} "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID:[0-9a-f]+]]"38// DIFF-NOT: "-target-cpu" "gfx906" {{.*}}"-cuid=[[CUID]]"39