This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH i386 2/8] [AVX512] Add mask registers.
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, Uros Bizjak <ubizjak at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 10 Sep 2013 16:57:51 +0400
- Subject: Re: [PATCH i386 2/8] [AVX512] Add mask registers.
- Authentication-results: sourceware.org; auth=none
- References: <521B8445 dot 20602 at redhat dot com> <20130827181133 dot GA42618 at msticlxl57 dot ims dot intel dot com> <521D06EC dot 4000709 at redhat dot com> <20130828174536 dot GA47152 at msticlxl57 dot ims dot intel dot com> <521E398B dot 8010103 at redhat dot com> <20130828183805 dot GA14518 at msticlxl57 dot ims dot intel dot com> <521E5AD8 dot 5090604 at redhat dot com> <20130828220508 dot GB14518 at msticlxl57 dot ims dot intel dot com> <20130829115920 dot GC14518 at msticlxl57 dot ims dot intel dot com> <522E07DE dot 2050707 at redhat dot com>
Hello Richard,
Thanks for inputs.
On 09 Sep 10:39, Richard Henderson wrote:
> gen_andhi_1 is not used, nor is it likely to be in the future, therefore this
> should still have "*".
We're using it in patch 6/8 when introducing plugins:
+ { OPTION_MASK_ISA_AVX512F, CODE_FOR_andhi_1, "__builtin_ia32_kandhi", IX86_BUILTIN_KAND16, UNKNOWN, (int) HI_FTYPE_HI_HI },
And covered by tests in patch 8/8:
new file mode 100644
index 0000000..3d777c8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "kandnw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test ()
+{
+ __mmask16 k1, k2, k3;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (2) );
+
+ k3 = _mm512_kandn (k1, k2);
+ x = _mm512_mask_add_ps (x, k3, x, x);
+}
>
> > +(define_insn "<code>hi_1"
> > + [(set (match_operand:HI 0 "nonimmediate_operand" "=r,rm,!Yk")
> > + (any_or:HI
> > + (match_operand:HI 1 "nonimmediate_operand" "%0,0,Yk")
> > + (match_operand:HI 2 "general_operand" "<g>,r<i>,Yk")))
> > + (clobber (reg:CC FLAGS_REG))]
>
> Likewise.
Same as above.
Do you still think we need "*"?
--
Thanks, K