Skip to content

Commit 571d5af

Browse files
committed
[DAGCombiner] Improve comment on reassociateOps and its helper
1 parent 8ee7ef6 commit 571d5af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,8 +1145,8 @@ bool DAGCombiner::reassociationCanBreakAddressingModePattern(unsigned Opc,
11451145
return false;
11461146
}
11471147

1148-
// Helper for DAGCombiner::reassociateOps. Try to reassociate an expression
1149-
// such as (Opc N0, N1), if \p N0 is the same kind of operation as \p Opc.
1148+
/// Helper for DAGCombiner::reassociateOps. Try to reassociate (Opc N0, N1) if
1149+
/// \p N0 is the same kind of operation as \p Opc.
11501150
SDValue DAGCombiner::reassociateOpsCommutative(unsigned Opc, const SDLoc &DL,
11511151
SDValue N0, SDValue N1,
11521152
SDNodeFlags Flags) {
@@ -1244,7 +1244,8 @@ SDValue DAGCombiner::reassociateOpsCommutative(unsigned Opc, const SDLoc &DL,
12441244
return SDValue();
12451245
}
12461246

1247-
// Try to reassociate commutative binops.
1247+
/// Try to reassociate commutative (Opc N0, N1) if either \p N0 or \p N1 is the
1248+
/// same kind of operation as \p Opc.
12481249
SDValue DAGCombiner::reassociateOps(unsigned Opc, const SDLoc &DL, SDValue N0,
12491250
SDValue N1, SDNodeFlags Flags) {
12501251
assert(TLI.isCommutativeBinOp(Opc) && "Operation not commutative.");

0 commit comments

Comments
 (0)