[PATCH] Add support to promote f16 to f32
Pirama Arumuga Nainar
pirama at google.com
Wed Apr 1 10:07:32 PDT 2015
I forgot to subscribe llvm-commits. So, I'm re-sending the Summary and the raw diff to the mailing list.
Summary:
This patch adds legalization support to operate on FP16 as a load/store type
and do operations on it as floats.
Generic pass/fail tests have been added to
test/CodeGen/Generic/fp16-promote.ll.
This patch is rough on the edges and needs to handle:
the right approach to expose this as a command-line option. Right now, the option is added to TargetOptions.h, but that might not be right.
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.
Once the high-level issues are ironed out, I'll add target-specific tests to verify instructions for this promotion.
F448981: D8755.diff <http://reviews.llvm.org/F448981>
http://reviews.llvm.org/D8755
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list