[clang] [flang] [Flang] Add -ffast-real-mod and direct code for MOD on REAL types (PR #160660)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 25 01:27:00 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- clang/lib/Driver/ToolChains/Flang.cpp flang/lib/Frontend/CompilerInvocation.cpp flang/lib/Frontend/FrontendActions.cpp flang/lib/Optimizer/Builder/IntrinsicCall.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
index fee5f2b24..635a6ae00 100644
--- a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
+++ b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
@@ -6994,7 +6994,8 @@ static mlir::Value genFastMod(fir::FirOpBuilder &builder, mlir::Location loc,
auto fastmathFlags = mlir::arith::FastMathFlags::contract;
auto fastmathAttr =
mlir::arith::FastMathFlagsAttr::get(builder.getContext(), fastmathFlags);
- mlir::Value divResult = mlir::arith::DivFOp::create(builder, loc, a, p, fastmathAttr);
+ mlir::Value divResult =
+ mlir::arith::DivFOp::create(builder, loc, a, p, fastmathAttr);
mlir::Type intType = builder.getIntegerType(
a.getType().getIntOrFloatBitWidth(), /*signed=*/true);
mlir::Value intResult = builder.createConvert(loc, intType, divResult);
``````````
</details>
https://github.com/llvm/llvm-project/pull/160660
More information about the cfe-commits
mailing list