diff options
author | Richard Biener <rguenther@suse.de> | 2019-08-16 13:17:04 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-08-16 13:17:04 +0000 |
commit | 772a1b15d57f0c035188f85cf42641b217eef9eb (patch) | |
tree | 17d614212d989f201b899112a7e1bd1c0aca48f1 | |
parent | 4305b26e1d83b8065f978839252328bca24007e0 (diff) | |
download | gcc-772a1b15d57f0c035188f85cf42641b217eef9eb.zip gcc-772a1b15d57f0c035188f85cf42641b217eef9eb.tar.gz gcc-772a1b15d57f0c035188f85cf42641b217eef9eb.tar.bz2 |
re PR target/91469 (ICE in extract_insn, at recog.c:2310 since r274481)
2019-08-16 Richard Biener <rguenther@suse.de>
PR target/91469
* config/i386/i386-features.c
(general_scalar_chain::replace_with_subreg): Stop at memory operands.
* gcc.target/i386/pr91469-1.c: New testcase.
* gcc.target/i386/pr91469-2.c: Likewise.
From-SVN: r274570
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386-features.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr91469-1.c | 17 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr91469-2.c | 11 |
5 files changed, 44 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6bd5e9b..e2e5efd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-08-16 Richard Biener <rguenther@suse.de> + + PR target/91469 + * config/i386/i386-features.c + (general_scalar_chain::replace_with_subreg): Stop at memory operands. + 2019-08-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com> PR other/91255 diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c index cead207..c4a3d30 100644 --- a/gcc/config/i386/i386-features.c +++ b/gcc/config/i386/i386-features.c @@ -613,6 +613,10 @@ general_scalar_chain::replace_with_subreg (rtx x, rtx reg, rtx new_reg) if (x == reg) return gen_rtx_SUBREG (vmode, new_reg, 0); + /* But not in memory addresses. */ + if (MEM_P (x)) + return x; + const char *fmt = GET_RTX_FORMAT (GET_CODE (x)); int i, j; for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 08af213..74afb38 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-08-16 Richard Biener <rguenther@suse.de> + + PR target/91469 + * gcc.target/i386/pr91469-1.c: New testcase. + * gcc.target/i386/pr91469-2.c: Likewise. + 2019-08-16 Mark Eggleston <mark.eggleston@codethink.com> * gfortran.dg/auto_in_equiv_1.f90: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr91469-1.c b/gcc/testsuite/gcc.target/i386/pr91469-1.c new file mode 100644 index 0000000..589b72d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr91469-1.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-funroll-loops -O2 -fno-gcse -mavx512vbmi -fno-ivopts -mstv" } */ + +int a, b, e; +long long c; +int d[6]; + +void fn1() { + int i; + unsigned f; + c = a; + f = i; + for (; i < b; i++) + if (d[i] > f) + f = d[i]; + e = f; +} diff --git a/gcc/testsuite/gcc.target/i386/pr91469-2.c b/gcc/testsuite/gcc.target/i386/pr91469-2.c new file mode 100644 index 0000000..4254aaa --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr91469-2.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-Os --param scev-max-expr-size=0 -mavx512vnni -funroll-all-loops" } */ + +int a, b, c, d; +int *e; +void fn1() +{ + b = c > 0 ? c : 0; + d += e[b]; + a = d > 0 ? d : 0; +} |