mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Add ISD::FROUND for libm round()
All libm floating-point rounding functions, except for round(), had their own ISD nodes. Recent PowerPC cores have an instruction for round(), and so here I'm adding ISD::FROUND so that round() can be custom lowered as well. For the most part, this is straightforward. I've added an intrinsic and a matching ISD node just like those for nearbyint() and friends. The SelectionDAG pattern I've named frnd (because ISD::FP_ROUND has already claimed fround). This will be used by the PowerPC backend in a follow-up commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -449,6 +449,7 @@ unsigned BasicTTI::getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy,
|
||||
case Intrinsic::nearbyint:
|
||||
ISD = ISD::FNEARBYINT; break;
|
||||
case Intrinsic::rint: ISD = ISD::FRINT; break;
|
||||
case Intrinsic::round: ISD = ISD::FROUND; break;
|
||||
case Intrinsic::pow: ISD = ISD::FPOW; break;
|
||||
case Intrinsic::fma: ISD = ISD::FMA; break;
|
||||
case Intrinsic::fmuladd: ISD = ISD::FMA; break; // FIXME: mul + add?
|
||||
|
||||
Reference in New Issue
Block a user