@@ -17492,10 +17492,10 @@ SDValue DAGCombiner::visitFCOPYSIGN(SDNode *N) {
17492
17492
SDValue N0 = N->getOperand(0);
17493
17493
SDValue N1 = N->getOperand(1);
17494
17494
EVT VT = N->getValueType(0);
17495
+ SDLoc DL(N);
17495
17496
17496
17497
// fold (fcopysign c1, c2) -> fcopysign(c1,c2)
17497
- if (SDValue C =
17498
- DAG.FoldConstantArithmetic(ISD::FCOPYSIGN, SDLoc(N), VT, {N0, N1}))
17498
+ if (SDValue C = DAG.FoldConstantArithmetic(ISD::FCOPYSIGN, DL, VT, {N0, N1}))
17499
17499
return C;
17500
17500
17501
17501
if (ConstantFPSDNode *N1C = isConstOrConstSplatFP(N->getOperand(1))) {
@@ -17504,10 +17504,10 @@ SDValue DAGCombiner::visitFCOPYSIGN(SDNode *N) {
17504
17504
// copysign(x, c1) -> fneg(fabs(x)) iff isneg(c1)
17505
17505
if (!V.isNegative()) {
17506
17506
if (!LegalOperations || TLI.isOperationLegal(ISD::FABS, VT))
17507
- return DAG.getNode(ISD::FABS, SDLoc(N) , VT, N0);
17507
+ return DAG.getNode(ISD::FABS, DL , VT, N0);
17508
17508
} else {
17509
17509
if (!LegalOperations || TLI.isOperationLegal(ISD::FNEG, VT))
17510
- return DAG.getNode(ISD::FNEG, SDLoc(N) , VT,
17510
+ return DAG.getNode(ISD::FNEG, DL , VT,
17511
17511
DAG.getNode(ISD::FABS, SDLoc(N0), VT, N0));
17512
17512
}
17513
17513
}
@@ -17517,20 +17517,20 @@ SDValue DAGCombiner::visitFCOPYSIGN(SDNode *N) {
17517
17517
// copysign(copysign(x,z), y) -> copysign(x, y)
17518
17518
if (N0.getOpcode() == ISD::FABS || N0.getOpcode() == ISD::FNEG ||
17519
17519
N0.getOpcode() == ISD::FCOPYSIGN)
17520
- return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N) , VT, N0.getOperand(0), N1);
17520
+ return DAG.getNode(ISD::FCOPYSIGN, DL , VT, N0.getOperand(0), N1);
17521
17521
17522
17522
// copysign(x, abs(y)) -> abs(x)
17523
17523
if (N1.getOpcode() == ISD::FABS)
17524
- return DAG.getNode(ISD::FABS, SDLoc(N) , VT, N0);
17524
+ return DAG.getNode(ISD::FABS, DL , VT, N0);
17525
17525
17526
17526
// copysign(x, copysign(y,z)) -> copysign(x, z)
17527
17527
if (N1.getOpcode() == ISD::FCOPYSIGN)
17528
- return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N) , VT, N0, N1.getOperand(1));
17528
+ return DAG.getNode(ISD::FCOPYSIGN, DL , VT, N0, N1.getOperand(1));
17529
17529
17530
17530
// copysign(x, fp_extend(y)) -> copysign(x, y)
17531
17531
// copysign(x, fp_round(y)) -> copysign(x, y)
17532
17532
if (CanCombineFCOPYSIGN_EXTEND_ROUND(N))
17533
- return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N) , VT, N0, N1.getOperand(0));
17533
+ return DAG.getNode(ISD::FCOPYSIGN, DL , VT, N0, N1.getOperand(0));
17534
17534
17535
17535
// We only take the sign bit from the sign operand.
17536
17536
EVT SignVT = N1.getValueType();
0 commit comments