[llvm] r212638 - AArch64: Better codegen for storing to __fp16.

Jim Grosbach grosbach at apple.com
Thu Jul 10 09:42:12 PDT 2014

> On Jul 10, 2014, at 2:09 AM, Tim Northover <t.p.northover at gmail.com> wrote:
> Hi Jim,
>> This also eliminates an extra step in the convert-from-f64 path
>> which was first converting to f32 and then to f16 from there.
> Is that allowed in strict IEEE? We're not allowed to form FMAs
> willy-nilly even though they're guaranteed more precise, for example.
> I'd have said the original double-conversion issue needed fixing in
> Clang.

Sort-of. It’s not wrong to go through float, but doing so does require care about rounding (which we weren’t doing). clang itself is introducing the double->float->half path due to the desire to use f32_to_f16 intrinsics rather than fround. That’s mainly required at all to work around horribleness in the backend legalization for targets that want half as an interchange-only format. I wouldn’t object to adding f64<—>f16 intrinsics, though I’d really rather we fix the backend to not require such things at all. That, however, is a potentially very large task.


More information about the llvm-commits mailing list