public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>, Kirill Yukhin <kirill.yukhin@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix a couple of avx512* intrinsic prototypes (PR target/87674)
Date: Tue, 23 Oct 2018 08:57:00 -0000	[thread overview]
Message-ID: <20181023083546.GE11625@tucnak> (raw)

Hi!

For all these, the instructions use just 8-bits from mask register and
ICC prototypes as well as online Intel intrinsic documentation confirm that
too.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Not sure if we need to backport it, this isn't a wrong-code issue, the
important mask bits aren't lost in any way.

2018-10-23  Jakub Jelinek  <jakub@redhat.com>

	PR target/87674
	* config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
	second argument from __mmask16 to __mmask8.
	* config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
	_mm_mask_packs_epi32): Likewise.
	* config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
	Likewise.
	(_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.

--- gcc/config/i386/avx512vlintrin.h.jj	2018-10-22 09:28:21.843398728 +0200
+++ gcc/config/i386/avx512vlintrin.h	2018-10-22 09:52:39.432092006 +0200
@@ -9095,7 +9095,7 @@ _mm_maskz_mullo_epi32 (__mmask8 __M, __m
 
 extern __inline __m128i
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_mullo_epi32 (__m128i __W, __mmask16 __M, __m128i __A,
+_mm_mask_mullo_epi32 (__m128i __W, __mmask8 __M, __m128i __A,
 		      __m128i __B)
 {
   return (__m128i) __builtin_ia32_pmulld128_mask ((__v4si) __A,
--- gcc/config/i386/avx512vlbwintrin.h.jj	2018-07-11 22:55:44.663456512 +0200
+++ gcc/config/i386/avx512vlbwintrin.h	2018-10-22 09:55:24.784333238 +0200
@@ -4346,7 +4346,7 @@ _mm_maskz_packus_epi32 (__mmask8 __M, __
 
 extern __inline __m128i
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_packus_epi32 (__m128i __W, __mmask16 __M, __m128i __A,
+_mm_mask_packus_epi32 (__m128i __W, __mmask8 __M, __m128i __A,
 		       __m128i __B)
 {
   return (__m128i) __builtin_ia32_packusdw128_mask ((__v4si) __A,
@@ -4389,7 +4389,7 @@ _mm_maskz_packs_epi32 (__mmask8 __M, __m
 
 extern __inline __m128i
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm_mask_packs_epi32 (__m128i __W, __mmask16 __M, __m128i __A,
+_mm_mask_packs_epi32 (__m128i __W, __mmask8 __M, __m128i __A,
 		      __m128i __B)
 {
   return (__m128i) __builtin_ia32_packssdw128_mask ((__v4si) __A,
--- gcc/config/i386/avx512pfintrin.h.jj	2018-01-03 10:20:06.095535707 +0100
+++ gcc/config/i386/avx512pfintrin.h	2018-10-22 09:49:52.647874664 +0200
@@ -174,16 +174,16 @@ _mm512_prefetch_i64scatter_ps (void *__a
 
 extern __inline void
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i64scatter_pd (void *__addr, __mmask16 __mask,
+_mm512_mask_prefetch_i64scatter_pd (void *__addr, __mmask8 __mask,
 				    __m512i __index, int __scale, int __hint)
 {
   __builtin_ia32_scatterpfqpd (__mask, (__v8di) __index, __addr, __scale,
-			      __hint);
+			       __hint);
 }
 
 extern __inline void
 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm512_mask_prefetch_i64scatter_ps (void *__addr, __mmask16 __mask,
+_mm512_mask_prefetch_i64scatter_ps (void *__addr, __mmask8 __mask,
 				    __m512i __index, int __scale, int __hint)
 {
   __builtin_ia32_scatterpfqps (__mask, (__v8di) __index, __addr, __scale,

	Jakub

             reply	other threads:[~2018-10-23  8:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23  8:57 Jakub Jelinek [this message]
2018-10-23  9:10 ` Uros Bizjak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181023083546.GE11625@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kirill.yukhin@gmail.com \
    --cc=ubizjak@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).