Skip to content

Commit 30deb76

Browse files
committed
[DAG] visitXOR - add missing comment for or/and constant demorgan fold. NFC.
Noticed while triaging llvm#112347 which is using this fold - we described the or->and fold, but not the equivalent and->or which is also handled.
1 parent 74eb079 commit 30deb76

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9606,6 +9606,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
96069606
}
96079607
}
96089608
// fold (not (or x, y)) -> (and (not x), (not y)) iff x or y are constants
9609+
// fold (not (and x, y)) -> (or (not x), (not y)) iff x or y are constants
96099610
if (isAllOnesConstant(N1) && N0.hasOneUse() &&
96109611
(N0Opcode == ISD::OR || N0Opcode == ISD::AND)) {
96119612
SDValue N00 = N0.getOperand(0), N01 = N0.getOperand(1);

0 commit comments

Comments
 (0)