This is a minor NFC change to make the code more clear. We have the NegatibleCost that has cheaper, neutral, and expensive. Typically, the smaller one means the less cost. It is inverse for current implementation, which makes following code not easy to read.
If (CostX > CostY) negate(X)
if (CostX > CostY) { // fold (fneg (fma X, Y, Z)) -> (fma (fneg X), Y, (fneg Z)) SDValue NegX = getNegatedExpression(X, DAG, LegalOps, OptForSize, Depth); return DAG.getNode(Opcode, DL, VT, NegX, Y, NegZ, Flags); }