[llvm-commits] [llvm] r98497 - /llvm/trunk/include/llvm/Intrinsics.td

Chris Lattner clattner at apple.com
Sun Mar 14 15:47:45 PDT 2010


On Mar 14, 2010, at 11:41 AM, Anton Korobeynikov wrote:

> Author: asl
> Date: Sun Mar 14 13:41:50 2010
> New Revision: 98497
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=98497&view=rev
> Log:
> Add intrinsics to represent fp16 <-> fp32 conversions

Very cool.  Would you be willing to implement versions of these operations for compiler_rt?  That way we could make it a target-independent feature.

-Chris

> 
> Modified:
>    llvm/trunk/include/llvm/Intrinsics.td
> 
> Modified: llvm/trunk/include/llvm/Intrinsics.td
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=98497&r1=98496&r2=98497&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Intrinsics.td (original)
> +++ llvm/trunk/include/llvm/Intrinsics.td Sun Mar 14 13:41:50 2010
> @@ -450,6 +450,14 @@
> def int_trap : Intrinsic<[llvm_void_ty]>,
>                GCCBuiltin<"__builtin_trap">;
> 
> +// Intrisics to support half precision floating point format
> +def int_convert_to_fp16   : Intrinsic<[llvm_i16_ty],
> +                                      [llvm_float_ty]>,
> +                            GCCBuiltin<"__gnu_f2h_ieee">;
> +def int_convert_from_fp16 : Intrinsic<[llvm_float_ty],
> +                                      [llvm_i16_ty]>,
> +                            GCCBuiltin<"__gnu_h2f_ieee">;
> +
> // These convert intrinsics are to support various conversions between
> // various types with rounding and saturation. NOTE: avoid using these
> // intrinsics as they might be removed sometime in the future and
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list