This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH to fix warnings in avx headers
- From: Jason Merrill <jason at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 09 Nov 2014 22:57:53 -0600
- Subject: PATCH to fix warnings in avx headers
- Authentication-results: sourceware.org; auth=none
Warnings are suppressed in these headers by default, but I noticed some
after preprocessing and stripping # lines. A few functions were missing
return types, and _mm256_broadcast_f32x2 was passing a constant value
that overflows the 8-bit type of the parameter.
Tested x86_64-pc-linux-gnu, applying to trunk as obvious.
commit db1c21e59e91f821ef33ab1f324507992ba5ba2f
Author: Jason Merrill <jason@redhat.com>
Date: Fri Nov 7 20:21:56 2014 -0600
* config/i386/avx512vldqintrin.h (_mm256_broadcast_f32x2): __mmask8.
* config/i386/avx512vlintrin.h (_mm256_mask_cvtepi32_storeu_epi16)
(_mm_mask_cvtusepi32_storeu_epi16)
(_mm_mask_cvtsepi64_storeu_epi32): Return void.
diff --git a/gcc/config/i386/avx512vldqintrin.h b/gcc/config/i386/avx512vldqintrin.h
index 43a7388..4ad1fd7 100644
--- a/gcc/config/i386/avx512vldqintrin.h
+++ b/gcc/config/i386/avx512vldqintrin.h
@@ -453,7 +453,7 @@ _mm256_broadcast_f32x2 (__m128 __A)
{
return (__m256) __builtin_ia32_broadcastf32x2_256_mask ((__v4sf) __A,
(__v8sf)_mm256_undefined_ps(),
- (__mmask16) -
+ (__mmask8) -
1);
}
diff --git a/gcc/config/i386/avx512vlintrin.h b/gcc/config/i386/avx512vlintrin.h
index f39f7f3..a042e8c 100644
--- a/gcc/config/i386/avx512vlintrin.h
+++ b/gcc/config/i386/avx512vlintrin.h
@@ -1710,7 +1710,7 @@ _mm256_cvtepi32_epi16 (__m256i __A)
(__mmask8) -1);
}
-extern __inline
+extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_cvtepi32_storeu_epi16 (void * __P, __mmask8 __M, __m256i __A)
{
@@ -1813,7 +1813,7 @@ _mm_cvtusepi32_epi16 (__m128i __A)
(__mmask8) -1);
}
-extern __inline
+extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_mask_cvtusepi32_storeu_epi16 (void * __P, __mmask8 __M, __m128i __A)
{
@@ -2360,7 +2360,7 @@ _mm_cvtsepi64_epi32 (__m128i __A)
(__mmask8) -1);
}
-extern __inline
+extern __inline void
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_mask_cvtsepi64_storeu_epi32 (void * __P, __mmask8 __M, __m128i __A)
{