[llvm-dev] RFC: Complex in LLVM
David Greene via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 3 11:57:49 PDT 2019
"Finkel, Hal J. via llvm-dev" <llvm-dev at lists.llvm.org> writes:
>> Of course some
>> floating-point-types only make sense on certain targets. How would we
>> legalize a c24 on a target that doesn't support it natively? Calls into
>> compiler-rt?
>
>
> I think that we can have a sensible system for all current types: For
> the various types, we have:
>
> - x86_fp80 (and perhaps x86_mmx): Lowering for these is only
> supported in relevant x86 configurations, and lowering the complex
> variants will likewise work only in any relevant target configurations .
>
> - float, double: Lowering for these has an ABI, and we can use that
> ABI (runtime calls, expansions).
>
> - fp128 and ppc_fp128: On systems which support these, they're used
> for _Complex long double, and so there is an ABI to follow.
>
> - half: half may have an ABI on some systems, in which case we can
> follow it, and on other systems it is treated as a "storage only" type,
> which operations being promoted to single precision, and we can do the
> same for the default lowering.
Sounds reasonable.
-David
More information about the llvm-dev
mailing list