[llvm] [SelectionDAG] Fix isKnownNeverZeroFloat for vectors (PR #78308)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 08:28:53 PST 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 7700ea103187ba6e547deb501ca4a1402e8a23fd 3874940fdf4774b4b29828da85835d1bd0339f3d -- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 8bd39db82e..0b2afefd03 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5239,7 +5239,7 @@ bool SelectionDAG::isKnownNeverZeroFloat(SDValue Op) const {
   // Return false if we find any zero in a vector.
   if (Op->getOpcode() == ISD::BUILD_VECTOR ||
       Op->getOpcode() == ISD::SPLAT_VECTOR) {
-    return llvm::all_of(Op->op_values(), [](const SDValue &OpVal){
+    return llvm::all_of(Op->op_values(), [](const SDValue &OpVal) {
       if (auto *C = dyn_cast<ConstantFPSDNode>(OpVal))
         return !C->isZero();
       return false;

``````````

</details>


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


More information about the llvm-commits mailing list