[PATCH] D70736: [LegalizeTypes] Add SoftenFloatRes_Unary and SoftenFloatRes_Binary functions to factor repeated patterns out of many of the SoftenFloatRes_* functions
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 11:54:22 PST 2019
craig.topper created this revision.
craig.topper added a reviewer: efriedma.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
craig.topper marked an inline comment as done.
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp:200
SDValue DAGTypeLegalizer::SoftenFloatRes_FMINNUM(SDNode *N) {
- EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
- SDValue Ops[2] = { GetSoftenedFloat(N->getOperand(0)),
- GetSoftenedFloat(N->getOperand(1)) };
- TargetLowering::MakeLibCallOptions CallOptions;
- EVT OpsVT[2] = { N->getOperand(0).getValueType(),
- N->getOperand(1).getValueType() };
- CallOptions.setTypeListBeforeSoften(OpsVT, N->getValueType(0), true);
- return TLI.makeLibCall(DAG, GetFPLibCall(N->getValueType(0),
- RTLIB::FMIN_F32,
- RTLIB::FMIN_F64,
- RTLIB::FMIN_F80,
- RTLIB::FMIN_F128,
- RTLIB::FMIN_PPCF128),
- NVT, Ops, CallOptions, SDLoc(N)).first;
+ return SoftenFloatRes_Binary(N, GetFPLibCall(N->getValueType(0),
+ RTLIB::FMIN_F32,
----------------
Are these functions simple enough now that we should just inline this into the switch?
This has been factored out of D70654 <https://reviews.llvm.org/D70654> which will add strict FP support to these functions. By making the helpers we avoid repeating even more code.
https://reviews.llvm.org/D70736
Files:
llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70736.231115.patch
Type: text/x-patch
Size: 30597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191126/c627b8c5/attachment.bin>
More information about the llvm-commits
mailing list