1 // ; Check that -flto=thin without -fsplit-lto-unit has EnableSplitLTOUnit = 0
2 // RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s
3 // RUN: %clang_cc1 -flto=thin -emit-llvm < %s | FileCheck %s
4 // RUN: %clang_cc1 -flto=thin -funified-lto -triple=x86_64-scei-ps4 -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s
5 // CHECK: !{i32 1, !"EnableSplitLTOUnit", i32 0}
7 // ; Check that -flto=thin with -fsplit-lto-unit has EnableSplitLTOUnit = 1
8 // RUN: %clang_cc1 -flto=thin -fsplit-lto-unit -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s --check-prefix=SPLIT
9 // RUN: %clang_cc1 -flto=thin -fsplit-lto-unit -emit-llvm < %s | FileCheck %s --check-prefix=SPLIT
10 // SPLIT: !{i32 1, !"EnableSplitLTOUnit", i32 1}
12 // ; Check that regular LTO has EnableSplitLTOUnit = 1
13 // RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s --implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT
14 // RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm < %s | FileCheck %s --implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT
16 // ; Check that regular LTO has EnableSplitLTOUnit = 1, if using distinct pipelines. For unified pipelines, use EnableSplitLTOUnit = 0.
17 // RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s --implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT
18 // RUN: %clang_cc1 -flto -funified-lto -triple x86_64-scei-ps4 -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s
19 // RUN: %clang_cc1 -flto=thin -funified-lto -fsplit-lto-unit -triple x86_64-pc-linux-gnu -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s --implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT