From 5b7ed762347ea9e82a3982b57975747de0943eb4 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 10 Aug 2019 12:13:52 +0200 Subject: [PATCH] re PR target/91408 (ICE in extract_insn, at recog.c:2310 since r273981) PR target/91408 * config/i386/mmx.md (usadv8qi): Use register_operand instead of vector_operand. * gcc.target/i386/pr91408.c: New test. From-SVN: r274251 --- gcc/ChangeLog | 6 +++++ gcc/config/i386/mmx.md | 4 ++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr91408.c | 29 +++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr91408.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 350483acf66..56913a0377d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-08-10 Jakub Jelinek + + PR target/91408 + * config/i386/mmx.md (usadv8qi): Use register_operand instead of + vector_operand. + 2019-09-09 Vladimir Makarov * reload1.c (finish_spills): Do not check ira_conflicts_p when diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index 3bbf5e07dcb..1fffea19957 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -1973,8 +1973,8 @@ (define_expand "usadv8qi" [(match_operand:V2SI 0 "register_operand") (match_operand:V8QI 1 "register_operand") - (match_operand:V8QI 2 "vector_operand") - (match_operand:V2SI 3 "vector_operand")] + (match_operand:V8QI 2 "register_operand") + (match_operand:V2SI 3 "register_operand")] "TARGET_MMX_WITH_SSE" { rtx t1 = gen_reg_rtx (V1DImode); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5864fc0080c..3fec121d6c7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-08-10 Jakub Jelinek + + PR target/91408 + * gcc.target/i386/pr91408.c: New test. + 2019-08-09 Segher Boessenkool * gcc.target/powerpc/vec_rotate-1.c: Rename to ... diff --git a/gcc/testsuite/gcc.target/i386/pr91408.c b/gcc/testsuite/gcc.target/i386/pr91408.c new file mode 100644 index 00000000000..13acd153fa0 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr91408.c @@ -0,0 +1,29 @@ +/* PR target/91408 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -ftree-loop-vectorize -fno-tree-forwprop" } */ + +long long a; +unsigned char b; +short *c; +int d; + +void +foo (long long *x) +{ + unsigned char *e = (char *) x; + int f, g = 0; + for (d = 0; d < 8; d++) + { + f = b - e[d]; + if (f < 0) + f = -f; + g += f; + } + c[0] = g; +} + +void +bar (void) +{ + foo (&a); +} -- 2.30.2