From 2721f62d504631f2bec593e577a8bd71b7615777 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Thu, 26 Mar 2015 22:44:58 +0000 Subject: [CodeGen] Don't pretend we can expand f16 libcalls. We used to mark a bunch of libm nodes as Expand for f16. There are no libcalls we can use for those, so we eventually just hit an unhelpful llvm_unreachable in ExpandFPLibCall. Instead, just ignore them altogether. If nothing else changes, we'll then get the more descriptive and pleasant "Cannot select" fatal error. There's an argument to be made for consistency, but f16 is already special in all the good ways, and as long as there's no f16 support in the ops expander (this patch), as well as the Soften/Expand float legalizers (which, when hit, will currently segfault), I think there's no point in even pretending we can legalize any of this. This shouldn't affect anything that's not already broken. llvm-svn: 233328 --- llvm/lib/CodeGen/TargetLoweringBase.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 89707007015..c5fe1c2afc9 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -829,19 +829,6 @@ void TargetLoweringBase::initActions() { setOperationAction(ISD::ConstantFP, MVT::f128, Expand); // These library functions default to expand. - setOperationAction(ISD::FLOG , MVT::f16, Expand); - setOperationAction(ISD::FLOG2, MVT::f16, Expand); - setOperationAction(ISD::FLOG10, MVT::f16, Expand); - setOperationAction(ISD::FEXP , MVT::f16, Expand); - setOperationAction(ISD::FEXP2, MVT::f16, Expand); - setOperationAction(ISD::FFLOOR, MVT::f16, Expand); - setOperationAction(ISD::FMINNUM, MVT::f16, Expand); - setOperationAction(ISD::FMAXNUM, MVT::f16, Expand); - setOperationAction(ISD::FNEARBYINT, MVT::f16, Expand); - setOperationAction(ISD::FCEIL, MVT::f16, Expand); - setOperationAction(ISD::FRINT, MVT::f16, Expand); - setOperationAction(ISD::FTRUNC, MVT::f16, Expand); - setOperationAction(ISD::FROUND, MVT::f16, Expand); setOperationAction(ISD::FLOG , MVT::f32, Expand); setOperationAction(ISD::FLOG2, MVT::f32, Expand); setOperationAction(ISD::FLOG10, MVT::f32, Expand); -- cgit v1.2.3