[llvm] [DAGCombiner] Don't let scalarizeBinOpOfSplats create illegal scalar MULHS/MULHU (PR #104518)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 15:52:31 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 c458e9e034b2c49a4b35eb732f08a30b338a9ae2 d0072617b79f76189e5a9192aed1d2cf9fd21390 --extensions cpp -- 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 cab7be9dd4..b21bea649e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -27141,8 +27141,7 @@ static SDValue scalarizeBinOpOfSplats(SDNode *N, SelectionDAG &DAG,
     return SDValue();
 
   // FIXME: Type legalization can't handle illegal MULHS/MULHU.
-  if ((Opcode == ISD::MULHS || Opcode == ISD::MULHU) &&
-      !TLI.isTypeLegal(EltVT))
+  if ((Opcode == ISD::MULHS || Opcode == ISD::MULHU) && !TLI.isTypeLegal(EltVT))
     return SDValue();
 
   SDValue IndexC = DAG.getVectorIdxConstant(Index0, DL);

``````````

</details>


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


More information about the llvm-commits mailing list