From bd6ab32e6eb642f2b0b15be8c7c2a668192f07d8 Mon Sep 17 00:00:00 2001 From: Yusuke MINATO Date: Mon, 28 Oct 2024 23:19:20 +0900 Subject: Revert "[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv" (#113901) Reverts llvm/llvm-project#110063 due to the performance regression on 503.bwaves_r in SPEC2017. --- flang/lib/Frontend/CompilerInvocation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 5da5236..94d3d11 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -1350,6 +1350,12 @@ bool CompilerInvocation::createFromArgs( invoc.loweringOpts.setNoPPCNativeVecElemOrder(true); } + // -flang-experimental-integer-overflow + if (args.hasArg( + clang::driver::options::OPT_flang_experimental_integer_overflow)) { + invoc.loweringOpts.setNSWOnLoopVarInc(true); + } + // Preserve all the remark options requested, i.e. -Rpass, -Rpass-missed or // -Rpass-analysis. This will be used later when processing and outputting the // remarks generated by LLVM in ExecuteCompilerInvocation.cpp. -- cgit v1.1