================
@@ -0,0 +1,25 @@
+! Check that -flto=thin without -fsplit-lto-unit has EnableSplitLTOUnit = 0
+! RUN: %flang -flto=thin -S -o - %s | FileCheck %s --check-prefix=SPLIT0
+! RUN: %flang -flto=thin --target=x86_64-linux-gnu -S -o - %s | FileCheck %s
--check-prefix=SPLIT0
+! RUN: %flang -flto=thin --target=x86_64-apple-macosx -S -o - %s | FileCheck
%s --check-prefix=SPLIT0
+!
+! Check that -flto=thin with -fsplit-lto-unit has EnableSplitLTOUnit = 1
+! RUN: %flang -flto=thin -fsplit-lto-unit -S -o - %s | FileCheck %s
--check-prefix=SPLIT1
+! RUN: %flang -flto=thin --target=x86_64-linux-gnu -fsplit-lto-unit -S -o - %s
| FileCheck %s --check-prefix=SPLIT1
+! RUN: %flang -flto=thin --target=x86_64-apple-macosx -fsplit-lto-unit -S -o -
%s | FileCheck %s --check-prefix=SPLIT1
+!
+! Check that regular LTO has EnableSplitLTOUnit = 1
+! RUN: %flang -flto -S -o - %s | FileCheck %s
--implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT1
+! RUN: %flang -flto --target=x86_64-linux-gnu -S -o - %s | FileCheck %s
--check-prefix=SPLIT1
+
+! Check that regular LTO has no EnableSplitLTOUnit for apple targets
+! RUN: %flang -flto --target=x86_64-apple-macosx -S -o - %s | FileCheck %s
--check-prefix=NOSPLIT
+
+! SPLIT0: !{i32 1, !"EnableSplitLTOUnit", i32 0}
+! SPLIT1: !{i32 1, !"EnableSplitLTOUnit", i32 1}
+! NOSPLIT-NOT: "EnableSplitLTOUnit"
+
+
+
----------------
tarunprabhu wrote:
nit: don't need so many newlines.
```suggestion
```
https://github.com/llvm/llvm-project/pull/202858
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits