[PATCH] Add support to promote f16 to f32

Pirama Arumuga Nainar pirama at google.com
Wed Apr 1 11:54:10 PDT 2015


On Wed, Apr 1, 2015 at 11:39 AM, Ahmed Bougacha <ahmed.bougacha at gmail.com>
wrote:

> On Wed, Apr 1, 2015 at 10:07 AM, Pirama Arumuga Nainar
> <pirama at google.com> wrote:
> > I do not have a reasonable way of finding whether ISD::FP_TO_FP16,
> ISD::FP16_TO_FP are supported by the target. If unsupported, we have to
> fall back to making a libcall to gnu_h2f_ieee. Right now, this is a
> hard-coded branch in LegalizeFloatTypes.cpp:GetPromotedValue but I need
> suggestions on how to handle this.
>
> Also, now that I think about it, isn't this already handled by ops
> legalization?  I believe you shouldn't have to worry about unsupported
> operations when legalizing types.
>

It is not handled for Mips.  So, ISEL aborts if FP_TO_FP16 is used instead
of the libcall.  I wasn't aware that Op legalization handles this.  I'll
find out why Mips doesn't do the right thing here.


>
> -Ahmed
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150401/7ecd6dd7/attachment.html>


More information about the llvm-commits mailing list