[PATCH] D96231: [X86] Always assign reassoc flag for intrinsics *reduce_add/mul_ps/pd.

Sanjay Patel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 08:51:14 PST 2021


spatel added inline comments.


================
Comment at: clang/lib/Headers/avx512fintrin.h:9352
 static __inline__ double __DEFAULT_FN_ATTRS512 _mm512_reduce_add_pd(__m512d __W) {
   return __builtin_ia32_reduce_fadd_pd512(0.0, __W);
 }
----------------
Ah - this is where the +0.0 is specified. This should be -0.0. We could still add 'nsz' flag to be safe.


================
Comment at: clang/lib/Headers/avx512fintrin.h:9362
   __W = _mm512_maskz_mov_pd(__M, __W);
   return __builtin_ia32_reduce_fadd_pd512(0.0, __W);
 }
----------------
This also should be changed to -0.0?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96231



More information about the cfe-commits mailing list