32 lines · cpp
1// REQUIRES: amdgpu-registered-target2 3// Test that -mlink-bitcode-postopt correctly enables LinkInModulesPass4 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 %s8 9// DEFAULT-NOT: LinkInModulesPass10 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 %s15 16// OPTION-POSITIVE: LinkInModulesPass17 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 %s22 23// OPTION-NEGATIVE-NOT: LinkInModulesPass24 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 %s30 31// OPTION-POSITIVE-NEGATIVE-NOT: LinkInModulesPass32