Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / hipspv-device-libs.hip
blob3a0fc1070a92c897d379bc421c9111bcfd2f81c0
1 // REQUIRES: x86-registered-target
2 // UNSUPPORTED: system-windows
4 // RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \
5 // RUN:  --hip-path=%S/Inputs/hipspv %s \
6 // RUN: 2>&1 | FileCheck --check-prefixes=ALL,HIP-PATH %s
8 // Test --hip-device-lib-path
9 // RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \
10 // RUN:  --hip-path=%S/Inputs/hipspv \
11 // RUN:   --hip-device-lib-path=%S/Inputs/hipspv-dev-lib %s \
12 // RUN: 2>&1 | FileCheck --check-prefixes=ALL,HIP-DEV-LIB-PATH %s
14 // Test --hip-device-lib w/ --hip-device-lib-path and HIP_DEVICE_LIB_PATH.
15 // RUN: env HIP_DEVICE_LIB_PATH=%S/Inputs/hipspv-dev-lib/a \
16 // RUN:   %clang -### -target x86_64-linux-gnu --offload=spirv64 \
17 // RUN:    --hip-path=%S/Inputs/hipspv \
18 // RUN:    --hip-device-lib-path=%S/Inputs/hipspv-dev-lib/b \
19 // RUN:    --hip-device-lib=a.bc --hip-device-lib=b.bc %s \
20 // RUN: 2>&1 | FileCheck --check-prefixes=ALL,HIP-DEV-LIB %s
22 // ALL: {{"[^"]*clang[^"]*"}}
23 // HIP-PATH: "-mlink-builtin-bitcode" {{".*/hipspv/lib/hip-device-lib/hipspv-spirv64.bc"}}
24 // HIP-DEV-LIB-PATH-NOT: "-mlink-builtin-bitcode" {{".*/hipspv/lib/hip-device-lib/hipspv-spirv64.bc"}}
25 // HIP-DEV-LIB-PATH: "-mlink-builtin-bitcode" {{".*/hipspv-dev-lib/hipspv-spirv64.bc"}}
26 // HIP-DEV-LIB: "-mlink-builtin-bitcode" {{".*/hipspv-dev-lib/a/a.bc"}}
27 // HIP-DEV-LIB-SAME: "-mlink-builtin-bitcode" {{".*/hipspv-dev-lib/b/b.bc"}}