Several FP instructions (fadd, fsub, etc.) were incorrectly assigned
a higher cost for SVE because they have custom lowering, however we
know they are legal. This patch explicitly assigns a cost of 2 to
these opcodes.
Tests added here:
Analysis/CostModel/AArch64/arith-fp-sve.ll
This condition is missing !Ty->getScalarType()->isFP128Ty(), and if you add it, the if-statement can be merged with the one above:
.. case ISD::FNEG: if (!Ty->getScalarType()->isFP128Ty()) return (Cost + 2) * LT.first;