[PATCH] D28195: [legalizetypes] Push fp16 -> fp32 extension node to worklist.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 15:30:52 PST 2017
fhahn updated this revision to Diff 86508.
fhahn retitled this revision from "[selectiondag] Mark node created in SoftenFloatRes_FP_EXTEND as Processed." to " [legalizetypes] Push fp16 -> fp32 extension node to worklist. ".
fhahn edited the summary of this revision.
Herald added a subscriber: mehdi_amini.
https://reviews.llvm.org/D28195
Files:
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
Index: lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
@@ -458,8 +458,10 @@
// hard-float FP_EXTEND rather than FP16_TO_FP.
if (Op.getValueType() == MVT::f16 && N->getValueType(0) != MVT::f32) {
Op = DAG.getNode(ISD::FP_EXTEND, SDLoc(N), MVT::f32, Op);
- if (getTypeAction(MVT::f32) == TargetLowering::TypeSoftenFloat)
- SoftenFloatResult(Op.getNode(), 0);
+ if (getTypeAction(MVT::f32) == TargetLowering::TypeSoftenFloat) {
+ Worklist.push_back(Op.getNode());
+ Op.getNode()->setNodeId(ReadyToProcess);
+ }
}
if (getTypeAction(Op.getValueType()) == TargetLowering::TypePromoteFloat) {
@@ -472,8 +474,6 @@
}
RTLIB::Libcall LC = RTLIB::getFPEXT(Op.getValueType(), N->getValueType(0));
- if (getTypeAction(Op.getValueType()) == TargetLowering::TypeSoftenFloat)
- Op = GetSoftenedFloat(Op);
assert(LC != RTLIB::UNKNOWN_LIBCALL && "Unsupported FP_EXTEND!");
return TLI.makeLibCall(DAG, LC, NVT, Op, false, SDLoc(N)).first;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28195.86508.patch
Type: text/x-patch
Size: 1155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170131/e032e6a3/attachment.bin>
More information about the llvm-commits
mailing list