| 1 |
// REQUIRES: amdgpu-registered-target |
| 2 |
|
| 3 |
// Test that -mlink-bitcode-postopt correctly enables LinkInModulesPass |
| 4 |
|
| 5 |
// RUN: %clang_cc1 -triple amdgcn-- -emit-llvm-bc -o /dev/null \ |
| 6 |
// RUN: -mllvm -print-pipeline-passes \ |
| 7 |
// RUN: %s 2>&1 | FileCheck --check-prefixes=DEFAULT %s |
| 8 |
|
| 9 |
// DEFAULT-NOT: LinkInModulesPass |
| 10 |
|
| 11 |
// RUN: %clang_cc1 -triple amdgcn-- -emit-llvm-bc -o /dev/null \ |
| 12 |
// RUN: -mllvm -print-pipeline-passes \ |
| 13 |
// RUN: -mlink-builtin-bitcode-postopt \ |
| 14 |
// RUN: %s 2>&1 | FileCheck --check-prefixes=OPTION-POSITIVE %s |
| 15 |
|
| 16 |
// OPTION-POSITIVE: LinkInModulesPass |
| 17 |
|
| 18 |
// RUN: %clang_cc1 -triple amdgcn-- -emit-llvm-bc -o /dev/null \ |
| 19 |
// RUN: -mllvm -print-pipeline-passes \ |
| 20 |
// RUN: -mno-link-builtin-bitcode-postopt \ |
| 21 |
// RUN: %s 2>&1 | FileCheck --check-prefixes=OPTION-NEGATIVE %s |
| 22 |
|
| 23 |
// OPTION-NEGATIVE-NOT: LinkInModulesPass |
| 24 |
|
| 25 |
// RUN: %clang_cc1 -triple amdgcn-- -emit-llvm-bc -o /dev/null \ |
| 26 |
// RUN: -mllvm -print-pipeline-passes \ |
| 27 |
// RUN: -mlink-builtin-bitcode-postopt \ |
| 28 |
// RUN: -mno-link-builtin-bitcode-postopt \ |
| 29 |
// RUN: %s 2>&1 | FileCheck --check-prefixes=OPTION-POSITIVE-NEGATIVE %s |
| 30 |
|
| 31 |
// OPTION-POSITIVE-NEGATIVE-NOT: LinkInModulesPass |