[llvm] [DAG] Canonicalize zero_extend to sign_extend based on target preference (PR #70671)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 08:44:31 PDT 2023


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 56dab2cb0733f10df4e9cff8c83dd7081154527b d19c0c56fb97ed9c248e9f6182419a078c1f5761 -- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.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 3f186a71256d..3e2fda23160c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -13833,7 +13833,6 @@ SDValue DAGCombiner::visitZERO_EXTEND(SDNode *N) {
       DAG.SignBitIsZero(N0))
     return DAG.getNode(ISD::SIGN_EXTEND, DL, VT, N0);
 
-
   // (zext (shl (zext x), cst)) -> (shl (zext x), cst)
   if ((N0.getOpcode() == ISD::SHL || N0.getOpcode() == ISD::SRL) &&
       !TLI.isZExtFree(N0, VT)) {

``````````

</details>


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


More information about the llvm-commits mailing list