From 622cd23a5c2abbda16e777baf9dbf4e29a82cb59 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 18 Jul 2014 18:13:45 +0200 Subject: [PATCH] re PR target/61794 (internal error: unrecognizable insn, from avx512 extract instruction) PR target/61794 * config/i386/sse.md (avx512f_vextract32x4_1_maskm): Fix instruction constraint. (avx512f_vextract32x4_1): Ditto. testsuite/ChangeLog: PR target/61794 * gcc.target/i386/pr61794.c: New test. From-SVN: r212824 --- gcc/ChangeLog | 11 +++++++++-- gcc/config/i386/sse.md | 14 ++++++++------ gcc/testsuite/ChangeLog | 7 ++++++- gcc/testsuite/gcc.target/i386/pr61794.c | 12 ++++++++++++ 4 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr61794.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 635034365899..e9819273c3e2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-07-18 Uros Bizjak + + PR target/61794 + * config/i386/sse.md (avx512f_vextract32x4_1_maskm): + Fix instruction constraint. + (avx512f_vextract32x4_1): Ditto. + 2014-07-18 Jonathan Wakely * doc/extend.texi (Template Instantiation): Remove stray parenthesis. @@ -1091,7 +1098,7 @@ * config/aarch64/aarch64.c (aarch64_expand_vec_perm): Delete unused variable i. -2014-07-01 Jan Hubicka +2014-07-01 Jan Hubicka * ipa-utils.h (method_class_type, vtable_pointer_value_to_binfo, vtable_pointer_value_to_vtable): Constify. @@ -1107,7 +1114,7 @@ polymorphic type. (compute_known_type_jump_func): Likewise. -2014-07-01 Jan Hubicka +2014-07-01 Jan Hubicka * tree.c (decls_same_for_odr, decls_same_for_odr, types_same_for_odr): Remove. diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index f667362b6f72..0f7ca27e7ee0 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -5892,9 +5892,10 @@ (match_operand 5 "const_0_to_15_operand")])) (match_operand: 6 "memory_operand" "0") (match_operand:QI 7 "register_operand" "Yk")))] - "TARGET_AVX512F && (INTVAL (operands[2]) = INTVAL (operands[3]) - 1) - && (INTVAL (operands[3]) = INTVAL (operands[4]) - 1) - && (INTVAL (operands[4]) = INTVAL (operands[5]) - 1)" + "TARGET_AVX512F + && (INTVAL (operands[2]) == (INTVAL (operands[3]) - 1) + && INTVAL (operands[3]) == (INTVAL (operands[4]) - 1) + && INTVAL (operands[4]) == (INTVAL (operands[5]) - 1))" { operands[2] = GEN_INT ((INTVAL (operands[2])) >> 2); return "vextract32x4\t{%2, %1, %0%{%7%}|%0%{%7%}, %1, %2}"; @@ -5914,9 +5915,10 @@ (match_operand 3 "const_0_to_15_operand") (match_operand 4 "const_0_to_15_operand") (match_operand 5 "const_0_to_15_operand")])))] - "TARGET_AVX512F && (INTVAL (operands[2]) = INTVAL (operands[3]) - 1) - && (INTVAL (operands[3]) = INTVAL (operands[4]) - 1) - && (INTVAL (operands[4]) = INTVAL (operands[5]) - 1)" + "TARGET_AVX512F + && (INTVAL (operands[2]) == (INTVAL (operands[3]) - 1) + && INTVAL (operands[3]) == (INTVAL (operands[4]) - 1) + && INTVAL (operands[4]) == (INTVAL (operands[5]) - 1))" { operands[2] = GEN_INT ((INTVAL (operands[2])) >> 2); return "vextract32x4\t{%2, %1, %0|%0, %1, %2}"; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f6e9f23e8f12..320269429806 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-07-18 Uros Bizjak + + PR target/61794 + * gcc.target/i386/pr61794.c: New test. + 2014-07-17 Richard Sandiford * gcc.target/mips/umips-lwp-1.c (foo): Use a shift/add sequence @@ -45,7 +50,7 @@ 2014-07-17 Uros Bizjak * gcc.dg/atomic/c11-atomic-exec-5.c (dg-additional-options): Use - -mfp-trap-mode=sui instead of -miee-with-inexact for alpha*-*-*. + -mfp-trap-mode=sui instead of -mieee-with-inexact for alpha*-*-*. * gfortran.dg/ieee/ieee_1.F90 (dg-additional-options): Ditto. 2014-07-17 Paolo Carlini diff --git a/gcc/testsuite/gcc.target/i386/pr61794.c b/gcc/testsuite/gcc.target/i386/pr61794.c new file mode 100644 index 000000000000..5f8e7d06c97f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr61794.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx512f" } */ + +#include + +__m512i zmm; +__m128i xmm; + +void test (void) +{ + xmm = _mm512_extracti32x4_epi32 (zmm, 0); +} -- 2.47.3