[llvm] [InstCombine] Fold fcmp ogt (x - y), 0 into fcmp ogt x, y #85245 (PR #85506)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 02:51:38 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 1a498103ee5c4d101e70dc49db11938d8b87b518 cc551c0f3bed7f7d1dce78276eb9d73d7a9bfec0 -- 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 b946eaaa7d..ed9cf4f90c 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -8047,7 +8047,8 @@ Instruction *InstCombinerImpl::visitFCmpInst(FCmpInst &I) {
case FCmpInst::FCMP_OEQ:
case FCmpInst::FCMP_OGE:
case FCmpInst::FCMP_OLE:
- // Skip optimization: fsub x, y unless guaranteed !isinf(x) && !isinf(y).
+ // Skip optimization: fsub x, y unless guaranteed !isinf(x) &&
+ // !isinf(y).
if (!LHSI->hasNoNaNs() && !LHSI->hasNoInfs() &&
!isKnownNeverInfinity(LHSI->getOperand(1), /*Depth=*/0,
getSimplifyQuery().getWithInstruction(&I)) &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/85506
More information about the llvm-commits
mailing list