[llvm] Resolving #171877 (PR #172139)

via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 13 02:45:00 PST 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 -- llvm/lib/Analysis/ConstantFolding.cpp llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp --diff_from_common_commit
``````````

: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/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 8a73c02bc..55dfca551 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -3244,15 +3244,15 @@ static Constant *ConstantFoldLibCall2(StringRef Name, Type *Ty,
   case LibFunc_fdim:
   case LibFunc_fdimf:
   case LibFunc_fdiml:
-      if (TLI->has(Func)){
-    APFloat Difference = Op1V;
-    Difference.subtract(Op2V, RoundingMode::NearestTiesToEven);
+    if (TLI->has(Func)) {
+      APFloat Difference = Op1V;
+      Difference.subtract(Op2V, RoundingMode::NearestTiesToEven);
 
-    APFloat MaxVal =
-        maximum(Difference, APFloat::getZero(Ty->getFltSemantics()));
-    return ConstantFP::get(Ty->getContext(), MaxVal);
-  }
-  break;
+      APFloat MaxVal =
+          maximum(Difference, APFloat::getZero(Ty->getFltSemantics()));
+      return ConstantFP::get(Ty->getContext(), MaxVal);
+    }
+    break;
   }
 
   return nullptr;

``````````

</details>


https://github.com/llvm/llvm-project/pull/172139


More information about the llvm-commits mailing list