[llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 21:56:01 PDT 2024
- Previous message: [llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
- Next message: [llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
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 470040bd4d54f39f9ac0868a2197fa2ae3e6d4f5 dbd3f2e1775a57e63c40afbdbc35897d5672484f -- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index 42eb4104ae..e7ab25b6e8 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -3352,10 +3352,10 @@ bool RISCVDAGToDAGISel::doPeepholeSHXADD(SDNode *N) {
SDValue Y = N11.getOperand(0);
SDValue Z = N->getOperand(0);
- SDNode *SH3ADD1 = CurDAG->getMachineNode(RISCV::SH3ADD, SDLoc(N), N->getValueType(0),
- Y, Z);
- SDNode *SH3ADD2 = CurDAG->getMachineNode(RISCV::SH3ADD, SDLoc(N), N->getValueType(0),
- SDValue(SH3ADD1, 0), X);
+ SDNode *SH3ADD1 =
+ CurDAG->getMachineNode(RISCV::SH3ADD, SDLoc(N), N->getValueType(0), Y, Z);
+ SDNode *SH3ADD2 = CurDAG->getMachineNode(
+ RISCV::SH3ADD, SDLoc(N), N->getValueType(0), SDValue(SH3ADD1, 0), X);
ReplaceUses(N, SH3ADD2);
return true;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/85734
- Previous message: [llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
- Next message: [llvm] [RISCV][WIP] Fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #85734)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list