https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91696

            Bug ID: 91696
           Summary: [X86] AVX512 intrinsics that only support SAE should
                    allow (_MM_FOUND_NO_EXC|_MM_FROUND_CUR_DIRECTION) to
                    match icc
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: craig.topper at gmail dot com
  Target Milestone: ---

The intrinsics that only support SAE like _mm512_cmp_round_ps_mask currently
only allow __MM_FROUND_NO_EXC or _MM_FROUND_CUR_DIRECTION to be specified in
the sae immediate parameter.

_MM_FROUND_NO_EXC isn't really the opposite of _MM_FROUND_CUR_DIRECTION based
on the format of this type of immediate. _MM_FROUND_NO_EXC by itself is
equivalent to (_MM_FROUND_NO_EXC|_MM_FROUND_TO_NEAREST_INT) since
_MM_FROUND_TO_NEAREST_INT is 0. But these instructions don't perform any
rounding so the rounding bits don't matter. It's a nice convenience that the
single constants _MM_FROUND_NO_EXC and _MM_FROUND_CUR_DIRECTION can be used.
But since the rounding mode doesn't matter
(_MM_FROUND_CUR_DIRECTION|_MM_FROUND_NO_EXC) should also be allowed.

Reply via email to