[PATCH] D109658: [X86][FP16] Change the order of the operands in complex FMA intrinsics to allow swap between the mul operands.

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 22 18:03:45 PDT 2021


pengfei added inline comments.


================
Comment at: clang/lib/Headers/avx512fp16intrin.h:2972
 #define _mm_mask_fcmadd_round_sch(A, U, B, C, R)                               \
   ((__m128h)__builtin_ia32_selectps_128(                                       \
       (__mmask8)(U & 1),                                                       \
----------------
craig.topper wrote:
> Why is this intrinsic written like this? We can't evaluate macro arguments like A and U twice. It can cause surprising results.
Thanks Craig! You are right, we can't evaluate them twice. But we have to use them twice, because we want to provide user the same functionality as former FMA intrinsics. Maybe we need to define and use temp variables.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109658



More information about the llvm-commits mailing list