forked from OSchip/llvm-project
parent
6b31b15b5a
commit
6b029a5380
|
@ -2390,8 +2390,7 @@ SDValue DAGCombiner::visitSDIV(SDNode *N) {
|
|||
return N0;
|
||||
// fold (sdiv X, -1) -> 0-X
|
||||
if (N1C && N1C->isAllOnesValue())
|
||||
return DAG.getNode(ISD::SUB, DL, VT,
|
||||
DAG.getConstant(0, DL, VT), N0);
|
||||
return DAG.getNode(ISD::SUB, DL, VT, DAG.getConstant(0, DL, VT), N0);
|
||||
|
||||
if (SDValue NewSel = foldBinOpIntoSelect(N))
|
||||
return NewSel;
|
||||
|
|
Loading…
Reference in New Issue