[llvm] [InstCombine] Implement `fcmp (fadd x, 0.0), y` => `fcmp x, y` optimization (PR #88476)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 20:12:13 PDT 2024
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 b45c9c313c5107b1942cd325e8ab3b4235948a08 a460fb08a0e5b57f02d44b0bbdf40952d5d42ac1 -- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index 88e025387a..2bfabdc50e 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -8103,7 +8103,7 @@ Instruction *InstCombinerImpl::visitFCmpInst(FCmpInst &I) {
// fcmp (fadd X, 0.0), Y --> fcmp X, Y
if (match(Op0, m_FAdd(m_Value(X), m_AnyZeroFP())))
return new FCmpInst(Pred, X, Op1, "", &I);
-
+
// fcmp X, (fadd Y, 0.0) --> fcmp X, Y
if (match(Op1, m_FAdd(m_Value(Y), m_AnyZeroFP())))
return new FCmpInst(Pred, Op0, Y, "", &I);
``````````
</details>
https://github.com/llvm/llvm-project/pull/88476
More information about the llvm-commits
mailing list