Skip to content

Commit c94af5d

Browse files
committed
Address arsenm's comment
1 parent de15dca commit c94af5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9702,7 +9702,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
97029702
}
97039703

97049704
// fold (not (add X, -1)) -> (neg X)
9705-
if (isAllOnesConstant(N1) && N0.getOpcode() == ISD::ADD && N0.hasOneUse() &&
9705+
if (N0.getOpcode() == ISD::ADD && N0.hasOneUse() && isAllOnesConstant(N1) &&
97069706
isAllOnesOrAllOnesSplat(N0.getOperand(1))) {
97079707
return DAG.getNegative(N0.getOperand(0), DL, VT);
97089708
}

0 commit comments

Comments
 (0)