[PATCH] [CodeGen] Properly support the half FP type with non-native operations (-fallow-half-args-and-returns)

Ahmed Bougacha ahmed.bougacha at gmail.com
Mon Mar 16 15:33:59 PDT 2015


Hi olista01,

The previous behavior was tantamount to saying LangOpts.NativeHalfType was implied by LangOpts.HalfArgsAndReturns, which AFAICT isn't true, especially given the latter is enabled by default on AArch64.
Instead, teach the various parts of CodeGen that already know about half (using the intrinsics or not) about the weird in-between case, where the "half" type is legal, but any operation on it (other than conversion from/to float and storage) isn't.

This is a smaller intermediate step to the end-goal of removing the intrinsic, always using "half", and letting the backend do the legalization.

Depends on D4602.

-Ahmed

http://reviews.llvm.org/D8367

Files:
  lib/CodeGen/CGExprScalar.cpp
  test/CodeGen/fp16-ops.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8367.22058.patch
Type: text/x-patch
Size: 20529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150316/6209e411/attachment.bin>


More information about the cfe-commits mailing list