[PATCH] D65753: Builtins: Add some v2f16 variants

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 5 13:21:54 PDT 2019


rjmccall added a comment.

Hmm, sorry, that's a C++ spec, and it looks like the (abandoned) C attempt at data parallelism (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2081.htm) doesn't introduce vector types.

Talking about it internally, I think there are two reasonable approaches:

- Add an OpenCL prefix to the builtin, e.g. `__builtin_cl_floorv216`.  This isn't great because it feels like it's heading towards a world with a million builtins for different element types and vector sizes.
- Make the builtin type-generic, e.g. `__builtin_generic_floor` (or `__builtin_tgmath_floor`), where the builtin allows an arbitrary floating-point argument (or vector thereof).


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

https://reviews.llvm.org/D65753





More information about the cfe-commits mailing list