llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Wael Yehia (w2yehia) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/216450.diff 2 Files Affected: - (modified) clang/lib/Frontend/CompilerInvocation.cpp (+1-1) - (modified) clang/test/Driver/lto.c (+2) ``````````diff diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 256ae636ca9e6..8a72e3c386d56 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2726,7 +2726,7 @@ unsigned clang::getOptimizationLevel(const ArgList &Args, InputKind IK, if (A->getOption().matches(options::OPT_O0)) return 0; - if (A->getOption().matches(options::OPT_Ofast)) + if (A->getOption().matches(options::OPT_Ofast) || A->getOption().matches(options::OPT_O4)) return 3; assert(A->getOption().matches(options::OPT_O)); diff --git a/clang/test/Driver/lto.c b/clang/test/Driver/lto.c index c9ee2f9c26223..838eb74086375 100644 --- a/clang/test/Driver/lto.c +++ b/clang/test/Driver/lto.c @@ -66,6 +66,8 @@ // RUN: -fuse-ld=lld -flto -O3 -### 2>&1 | FileCheck --check-prefix=O3 %s // RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \ // RUN: -fuse-ld=lld -flto -Ofast -### 2>&1 | FileCheck --check-prefix=O3 %s +// RUN: %clang --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/basic_cross_linux_tree %s \ +// RUN: -fuse-ld=lld -flto -O4 -### 2>&1 | FileCheck --check-prefix=O3 %s // O1: -plugin-opt=O1 // O2: -plugin-opt=O2 `````````` </details> https://github.com/llvm/llvm-project/pull/216450 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
