[llvm] [DAGCombiner] Enable constant folding of (bitcast int_c0) -> fp_c0 (PR #82289)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 16:00:31 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 030d07574f0252c21ed28ae258a5af0e577ea37b 6b525fbddffd37648f02841dbb276abce2118155 -- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 0cf5a23c25..cb202b9731 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -15232,8 +15232,7 @@ SDValue DAGCombiner::visitBITCAST(SDNode *N) {
   if (VT.isVector() &&
       (!LegalTypes ||
        (!LegalOperations && TLI.isTypeLegal(VT.getVectorElementType()))) &&
-      N0.getOpcode() == ISD::BUILD_VECTOR &&
-      N0->hasOneUse() &&
+      N0.getOpcode() == ISD::BUILD_VECTOR && N0->hasOneUse() &&
       cast<BuildVectorSDNode>(N0)->isConstant())
     return ConstantFoldBITCASTofBUILD_VECTOR(N0.getNode(),
                                              VT.getVectorElementType());

``````````

</details>


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


More information about the llvm-commits mailing list