[PATCH] D132107: [DAGCombiner][NFC] Tidy up unnecessary brackets in visitADD.
WangLian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 00:55:21 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG989ebc1783a5: [DAGCombiner][NFC] Tidy up unnecessary brackets in visitADD. (authored by Jimerlife).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132107/new/
https://reviews.llvm.org/D132107
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2672,9 +2672,9 @@
}
// fold a+vscale(c1)+vscale(c2) -> a+vscale(c1+c2)
- if ((N0.getOpcode() == ISD::ADD) &&
- (N0.getOperand(1).getOpcode() == ISD::VSCALE) &&
- (N1.getOpcode() == ISD::VSCALE)) {
+ if (N0.getOpcode() == ISD::ADD &&
+ N0.getOperand(1).getOpcode() == ISD::VSCALE &&
+ N1.getOpcode() == ISD::VSCALE) {
const APInt &VS0 = N0.getOperand(1)->getConstantOperandAPInt(0);
const APInt &VS1 = N1->getConstantOperandAPInt(0);
SDValue VS = DAG.getVScale(DL, VT, VS0 + VS1);
@@ -2691,9 +2691,9 @@
}
// Fold a + step_vector(c1) + step_vector(c2) to a + step_vector(c1+c2)
- if ((N0.getOpcode() == ISD::ADD) &&
- (N0.getOperand(1).getOpcode() == ISD::STEP_VECTOR) &&
- (N1.getOpcode() == ISD::STEP_VECTOR)) {
+ if (N0.getOpcode() == ISD::ADD &&
+ N0.getOperand(1).getOpcode() == ISD::STEP_VECTOR &&
+ N1.getOpcode() == ISD::STEP_VECTOR) {
const APInt &SV0 = N0.getOperand(1)->getConstantOperandAPInt(0);
const APInt &SV1 = N1->getConstantOperandAPInt(0);
APInt NewStep = SV0 + SV1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132107.453555.patch
Type: text/x-patch
Size: 1300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220818/079b520e/attachment.bin>
More information about the llvm-commits
mailing list