| 1 |
// UNSUPPORTED: system-windows |
| 2 |
|
| 3 |
// RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \ |
| 4 |
// RUN: --hip-path=%S/Inputs/hipspv -nogpuinc %s \ |
| 5 |
// RUN: 2>&1 | FileCheck --check-prefixes=FROM-HIP-PATH %s |
| 6 |
|
| 7 |
// RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \ |
| 8 |
// RUN: -nogpuinc -nogpulib --hipspv-pass-plugin=%S/Inputs/pass-plugin.so %s \ |
| 9 |
// RUN: 2>&1 | FileCheck --check-prefixes=FROM-OPTION %s |
| 10 |
|
| 11 |
// RUN: not %clang -### --target=x86_64-linux-gnu --offload=spirv64 \ |
| 12 |
// RUN: -nogpuinc -nogpulib --hipspv-pass-plugin=foo.so %s \ |
| 13 |
// RUN: 2>&1 | FileCheck --check-prefixes=FROM-OPTION-INVALID %s |
| 14 |
|
| 15 |
// RUN: %clang -### -target x86_64-linux-gnu --offload=spirv64 \ |
| 16 |
// RUN: -nogpuinc -nogpulib %s \ |
| 17 |
// RUN: 2>&1 | FileCheck --check-prefixes=NO-PLUGIN %s |
| 18 |
|
| 19 |
// FROM-HIP-PATH: {{".*opt"}} {{".*.bc"}} "-load-pass-plugin" |
| 20 |
// FROM-HIP-PATH-SAME: {{".*/Inputs/hipspv/lib/libLLVMHipSpvPasses.so"}} |
| 21 |
// FROM-OPTION: {{".*opt"}} {{".*.bc"}} "-load-pass-plugin" |
| 22 |
// FROM-OPTION-SAME: {{".*/Inputs/pass-plugin.so"}} |
| 23 |
// FROM-OPTION-INVALID: error: no such file or directory: 'foo.so' |
| 24 |
// NO-PLUGIN-NOT: {{".*opt"}} {{".*.bc"}} "-load-pass-plugin" |
| 25 |
// NO-PLUGIN-NOT: {{".*/Inputs/hipspv/lib/libLLVMHipSpvPasses.so"}} |