On Thu, Jun 27, 2019 at 5:38 PM Rainer Orth <r...@cebitec.uni-bielefeld.de> 
wrote:
>
> Hi Hongtao,
>
> > On Thu, Jun 27, 2019 at 5:02 PM Rainer Orth <r...@cebitec.uni-bielefeld.de> 
> > wrote:
> >>
> >> Hi Hongtao,
> >>
> >> >> as usual, the new effective-target keyword needs documenting in
> >> >> sourcebuild.texi.
> >> > Like this?
> >>
> >> a couple of nits: first of all, your mailer seems to replace tabs by a
> >> single space.  Please fix this or attach the patch instead.
> >>
> >> > Index: ChangeLog
> >> > ===================================================================
> >> > --- ChangeLog (revision 272668)
> >> > +++ ChangeLog (working copy)
> >> > @@ -1,3 +1,8 @@
> >> > +2019-06-27  Hongtao Liu  <hongtao....@intel.com>
> >> > +
> >> > + * doc/sourcebuild.texi: Document new effective target keyword
> >> > + avx512vp2intersect.
> >>
> >> Please include the sections you're modifying, something like
> >>
> >>         * doc/sourcebuild.texi (Effective-Target Keywords, Other
> >>         hardware attributes): Document avx512vp2intersect.
> >>
> >> And please don't include the ChangeLog in the patch, but include it in
> >> the mail proper: it won't apply due to date and context changes anyway.
> >> Best review https://gcc.gnu.org/contribute.html where this is documented
> >> besides other points of patch submission.
> >>
> >> Besides, it's most likely useful to also review the GNU Coding
> >> Standards, too, not only for ChangeLog formatting.
> >>
> >> > Index: testsuite/ChangeLog
> >> > ===================================================================
> >> > --- testsuite/ChangeLog (revision 272668)
> >> > +++ testsuite/ChangeLog (working copy)
> >> > @@ -1,3 +1,11 @@
> >> > +2019-06-27  Hongtao Liu  <hongtao....@intel.com>
> >> > +
> >> > + * lib/target-supports.exp: Add
> >> > + check_effective_target_avx512vp2intersect.
> >>
> >> Use
> >>
> >>         * lib/target-supports.exp
> >>         (check_effective_target_avx512vp2intersect): New proc.
> >>
> >> > + * gcc.target/i386/avx512vp2intersect-2intersect-1b.c: Add
> >> > + dg-require-effective-target avx512vp2intersect.
> >>
> >> Better:
> >>
> >>         * gcc.target/i386/avx512vp2intersect-2intersect-1b.c: Require
> >>         avx512vp2intersect.
> >>
> >> but that's a matter of preference.
> >>
> >> > Index: testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c
> >> > ===================================================================
> >> > --- testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c
> >> > (revision 272668)
> >> > +++ testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c
> >> > (working copy)
> >> > @@ -1,5 +1,6 @@
> >> >  /* { dg-do run } */
> >> >  /* { dg-options "-O2 -mavx512vp2intersect" } */
> >> > +/* { dg-require-effective-target "avx512vp2intersect" } */
> >>
> >> No need to quote avx512vp2intersect here and in the next test.
> >>
> >> Ok with those nits fixed.
> >>
> > Yes, thanks a lot.
> >> Thanks.
> >>         Rainer
> >>
> >> --
> >> -----------------------------------------------------------------------------
> >> Rainer Orth, Center for Biotechnology, Bielefeld University
> >
> > Ok for trunk?
>
> ENOPATCH
Sorry, Here is the patch.
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University


Changelog

gcc/
+2019-06-27  Hongtao Liu  <hongtao....@intel.com>
+
+ * doc/sourcebuild.texi (Effective-Target Keywords, Other
+ hardware attributes): Document avx512vp2intersect.
+

gcc/testsuite/
+2019-06-27  Hongtao Liu  <hongtao....@intel.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_avx512vp2intersect): New proc.
+ * gcc.target/i386/avx512vp2intersect-2intersect-1b.c: Add
+ dg-require-effective-target avx512vp2intersect.
+ * gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c: Ditto.
+


-- 
BR,
Hongtao
Index: doc/sourcebuild.texi
===================================================================
--- doc/sourcebuild.texi	(revision 272667)
+++ doc/sourcebuild.texi	(working copy)
@@ -2046,6 +2046,9 @@
 @item avx512f_runtime
 Target supports the execution of @code{avx512f} instructions.
 
+@item avx512vp2intersect
+Target supports the execution of @code{avx512vp2intersect} instructions.
+
 @item cell_hw
 Test system can execute AltiVec and Cell PPU instructions.
 
Index: testsuite/lib/target-supports.exp
===================================================================
--- testsuite/lib/target-supports.exp	(revision 272667)
+++ testsuite/lib/target-supports.exp	(working copy)
@@ -7963,6 +7963,20 @@
     } "-mavx512bw" ]
 }
 
+# Return 1 if avx512vp2intersect instructions can be compiled.
+proc check_effective_target_avx512vp2intersect { } {
+    return [check_no_compiler_messages avx512vp2intersect object {
+	typedef int __v16si __attribute__ ((__vector_size__ (64)));
+	typedef short __mmask16;
+	void
+	_mm512_2intersect_epi32 (__v16si __A, __v16si __B, __mmask16 *__U,
+				 __mmask16 *__M)
+	{
+	    __builtin_ia32_2intersectd512 (__U, __M, (__v16si) __A, (__v16si) __B);
+	}
+    } "-mavx512vp2intersect" ]
+}
+
 # Return 1 if avx512ifma instructions can be compiled.
 proc check_effective_target_avx512ifma { } {
     return [check_no_compiler_messages avx512ifma object {
Index: testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c
===================================================================
--- testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c	(revision 272668)
+++ testsuite/gcc.target/i386/avx512vp2intersect-2intersect-1b.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -mavx512vp2intersect" } */
+/* { dg-require-effective-target avx512vp2intersect } */
 
 #define AVX512F
 #include <x86intrin.h>
Index: testsuite/gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c
===================================================================
--- testsuite/gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c	(revision 272668)
+++ testsuite/gcc.target/i386/avx512vp2intersect-2intersectvl-1b.c	(working copy)
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-O2 -mavx512vp2intersect -mavx512vl" } */
+/* { dg-require-effective-target avx512vp2intersect } */
 
 #define AVX512F
 #include <x86intrin.h>

Reply via email to