Skip to content

Commit 728dad3

Browse files
committed
[DAGCombine] Address review comments
1 parent de06d42 commit 728dad3

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
@@ -9986,7 +9986,7 @@ SDValue DAGCombiner::visitSHL(SDNode *N) {
99869986
TLI.isOperationLegalOrCustom(ISD::MUL, VT)) {
99879987
SDValue Y = N1.getOperand(0);
99889988
SDLoc DL(N);
9989-
SDValue NegY = DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), Y);
9989+
SDValue NegY = DAG.getNegative(Y, DL, VT);
99909990
SDValue And = DAG.getNode(ISD::AND, DL, VT, Y, NegY);
99919991
return DAG.getNode(ISD::MUL, DL, VT, And, N0);
99929992
}

0 commit comments

Comments
 (0)