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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:07d52e63d999a0a10c7598c34c48365a357d3d5a

commit r9-8350-g07d52e63d999a0a10c7598c34c48365a357d3d5a
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Thu Mar 5 19:44:42 2020 +0100

    i386: Fix some -O0 avx2intrin.h and xopintrin.h intrinsic macros [PR94046]

    As the testcases show, the macros we have for -O0 for intrinsics that
require
    constant argument(s) should first cast the argument to the type the -O1+
    inline uses and afterwards to whatever type e.g. a builtin needs.
    The PR reported one which violated this, and I've grepped for all
double-casts
    and grepped out from that meaningful casts where the __m{128,256,512}{,d,i}
    first cast is cast to same sized __v* type and has the same kind of element
    type (float, double, integral).  These 7 macros were using different casts,
    and I've double checked them against the inline function types.

    2020-03-05  Jakub Jelinek  <ja...@redhat.com>

        PR target/94046
        * config/i386/avx2intrin.h (_mm_mask_i32gather_ps): Fix first cast of
        SRC and MASK arguments to __m128 from __m128d.
        (_mm256_mask_i32gather_ps): Fix first cast of MASK argument to __m256
        from __m256d.
        (_mm_mask_i64gather_ps): Fix first cast of MASK argument to __m128
        from __m128d.
        * config/i386/xopintrin.h (_mm_permute2_pd): Fix first cast of C
        argument to __m128i from __m128d.
        (_mm256_permute2_pd): Fix first cast of C argument to __m256i from
        __m256d.
        (_mm_permute2_ps): Fix first cast of C argument to __m128i from __m128.
        (_mm256_permute2_ps): Fix first cast of C argument to __m256i from
        __m256.

        * g++.target/i386/pr94046-1.C: New test.
        * g++.target/i386/pr94046-2.C: New test.

Reply via email to