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

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

https://gcc.gnu.org/g:5dd7682887c959a10d5d1d4d7ad7b4a0950805d2

commit r8-10456-g5dd7682887c959a10d5d1d4d7ad7b4a0950805d2
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++.dg/ext/pr94046-1.C: New test.
            * g++.dg/ext/pr94046-2.C: New test.

    (cherry picked from commit 07d52e63d999a0a10c7598c34c48365a357d3d5a)

Reply via email to