From 4b54ab976e5b0fd88580927adc6b8d5f2bd89044 Mon Sep 17 00:00:00 2001 From: Ilya Tocar Date: Wed, 14 Jan 2015 13:55:06 +0000 Subject: [PATCH] re PR target/64386 (ICE: in extract_insn, at recog.c:2327 (unrecognizable insn) with -mavx512bw) PR target/64386 gcc/ PR target/64386 * config/i386/i386.c (ix86_expand_sse_cmp): Handle V64QImode, V32HImode. testsuite/ * gcc.target/i386/pr64386.c: New test. From-SVN: r219600 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 8 ++++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr64386.c | 14 ++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr64386.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90414774303..43d6a1a0a93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-01-14 Ilya Tocar + + PR target/64386 + * config/i386/i386.c (ix86_expand_sse_cmp): Handle V64QImode, + V32HImode. + 2014-01-14 Ilya Tocar PR target/64393 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 91eae5ae3b5..f358ac23152 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -21318,6 +21318,14 @@ ix86_expand_sse_cmp (rtx dest, enum rtx_code code, rtx cmp_op0, rtx cmp_op1, switch (cmp_ops_mode) { + case V64QImode: + gcc_assert (TARGET_AVX512BW); + gen = code == GT ? gen_avx512bw_gtv64qi3 : gen_avx512bw_eqv64qi3_1; + break; + case V32HImode: + gcc_assert (TARGET_AVX512BW); + gen = code == GT ? gen_avx512bw_gtv32hi3 : gen_avx512bw_eqv32hi3_1; + break; case V16SImode: gen = code == GT ? gen_avx512f_gtv16si3 : gen_avx512f_eqv16si3_1; break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 12afaed3d82..d39b2d7814e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-01-14 Ilya Tocar + + PR target/64386 + * gcc.target/i386/pr64386.c: New test. + 2014-01-14 Ilya Tocar PR target/64393 diff --git a/gcc/testsuite/gcc.target/i386/pr64386.c b/gcc/testsuite/gcc.target/i386/pr64386.c new file mode 100644 index 00000000000..fc152cb93a7 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr64386.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O -ftree-vectorize -mavx512bw" } */ + +char ac[64], bc[64], ec[64]; + +void fc (void) +{ + int i; + for (i = 0; i < 64; i++) + { + char e = ec[i]; + ac[i] = bc[i] ? : e; + } +} -- 2.30.2