We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de15dca commit c94af5dCopy full SHA for c94af5d
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -9702,7 +9702,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N) {
9702
}
9703
9704
// fold (not (add X, -1)) -> (neg X)
9705
- if (isAllOnesConstant(N1) && N0.getOpcode() == ISD::ADD && N0.hasOneUse() &&
+ if (N0.getOpcode() == ISD::ADD && N0.hasOneUse() && isAllOnesConstant(N1) &&
9706
isAllOnesOrAllOnesSplat(N0.getOperand(1))) {
9707
return DAG.getNegative(N0.getOperand(0), DL, VT);
9708
0 commit comments