[llvm] [X86] Improve transform for add-like nodes to `add` (PR #83691)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 2 12:58:50 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 1f613bce19ea78789934b2a47be8c6a13925f0fa 518caa67c85ac629a0ee1a2675f84d2e79d0cd9e -- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 9f34a4e187..ae3d08342e 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -5305,8 +5305,7 @@ void X86DAGToDAGISel::Select(SDNode *Node) {
if (Opcode != ISD::ADD && NVT.isScalarInteger() &&
(Opcode == ISD::OR ||
(NVT == MVT::i8 || NVT == MVT::i16 || NVT == MVT::i32)) &&
- CurDAG->isADDLike(SDValue(Node, 0))
- ) {
+ CurDAG->isADDLike(SDValue(Node, 0))) {
SDValue AsAdd = CurDAG->getNode(ISD::ADD, SDLoc(Node), NVT,
Node->getOperand(0), Node->getOperand(1));
ReplaceUses(SDValue(Node, 0), AsAdd);
``````````
</details>
https://github.com/llvm/llvm-project/pull/83691
More information about the llvm-commits
mailing list