[PATCH] D113107: Support of expression granularity for _Float16.

Zahira Ammarguellat via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 23 04:50:18 PDT 2022


zahiraam added a comment.

In D113107#3603761 <https://reviews.llvm.org/D113107#3603761>, @pengfei wrote:

>> Supporting the lowering in the backend is sensible in order to support -fexcess-precision=16, because I agree that the most reasonable IR output in that configuration is to simply generate half operations. But under -fexcess-precision=32, I do not want the frontend to be in the business of recognizing cases where promoted emission is unnecessary, because that is just a lot of extra complexity for something that's already fairly special-case logic; among other things, it will tend to hide bugs.
>
> Fair enough. I agree we should choose the easy way to go. Thanks for the explanation!
>
>> So I think we should hold off on adding this option until we know what behavior we actually want to expose via it.
>
> I don't have strong opinion on the specific `-fexcess-precision` option, but we do need an option to stop the promotion in the FE. Some user requires the emulation to gets the identical result as running on real HW. How about we make `EmitFloat16WithExcessPrecision` an Clang option and set it true by default and false for feature `avx512fp16`?

That's fine be me.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113107/new/

https://reviews.llvm.org/D113107



More information about the cfe-commits mailing list