[PATCH] D148021: [Headers][doc] Add FMA intrinsic descriptions

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 08:18:37 PDT 2023


pengfei added inline comments.


================
Comment at: clang/lib/Headers/fmaintrin.h:22
+/// Computes a multiply-add of 128-bit vectors of [4 x float].
+///    For each element, computes <c> (__A * __B) + __C </c>.
+///
----------------
We are using a special format to describute the function in a pseudo code to share it with the intrinsic guide, e.g.,
https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/avx512fintrin.h#L9604-L9610
https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm512_i32logather_pd&ig_expand=4077

There's no strong requirement to follow it, but it would be better to adopt a uniform format.


================
Comment at: clang/lib/Headers/fmaintrin.h:26
+///
+/// This intrinsic corresponds to the <c> VFMADD213PS </c> instruction.
+///
----------------
It would be odd to user given this is just 1/3 instructions the intrinsic may generate, but I don't have a good idea here.


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

https://reviews.llvm.org/D148021



More information about the cfe-commits mailing list