Skip to content

Commit 25b702f

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

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
@@ -9594,6 +9594,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
95949594
}
95959595

95969596
// fold (not (or x, y)) -> (and (not x), (not y)) iff x or y are setcc
9597+
// fold (not (and x, y)) -> (or (not x), (not y)) iff x or y are setcc
95979598
if (isOneConstant(N1) && VT == MVT::i1 && N0.hasOneUse() &&
95989599
(N0Opcode == ISD::OR || N0Opcode == ISD::AND)) {
95999600
SDValue N00 = N0.getOperand(0), N01 = N0.getOperand(1);

0 commit comments

Comments
 (0)