From 51beaeba8a619ac11fbc7fd26d7d82e298b81c49 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 13 Dec 2018 20:44:50 +0100 Subject: [PATCH] re PR rtl-optimization/88416 (ICE in in df_uses_record, at df-scan.c:3013) PR rtl-optimization/88416 * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify even if !AUTO_INC_DEC. * gcc.target/i386/pr88416.c: New test. From-SVN: r267105 --- gcc/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/gcc.target/i386/pr88416.c | 5 +++++ gcc/valtrack.c | 2 -- 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr88416.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a447c49e53d..e205c220e89 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-12-13 Jakub Jelinek + + PR rtl-optimization/88416 + * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify + even if !AUTO_INC_DEC. + 2018-12-13 David Edelsohn * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5146c95d8c9..19c82c17b46 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2018-12-13 Jakub Jelinek + PR rtl-optimization/88416 + * gcc.target/i386/pr88416.c: New test. + PR tree-optimization/88464 * gcc.target/i386/avx512f-pr88462-1.c: New test. * gcc.target/i386/avx512f-pr88462-2.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr88416.c b/gcc/testsuite/gcc.target/i386/pr88416.c new file mode 100644 index 00000000000..3ab475929d7 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr88416.c @@ -0,0 +1,5 @@ +/* PR rtl-optimization/88416 */ +/* { dg-do compile } */ +/* { dg-options "-O1 -fvar-tracking-assignments -fno-forward-propagate --param max-cse-insns=1" } */ + +#include "writeeflags-1.c" diff --git a/gcc/valtrack.c b/gcc/valtrack.c index 4741d001071..5c36db16c16 100644 --- a/gcc/valtrack.c +++ b/gcc/valtrack.c @@ -56,8 +56,6 @@ static rtx cleanup_auto_inc_dec (rtx src, machine_mode mem_mode ATTRIBUTE_UNUSED) { rtx x = src; - if (!AUTO_INC_DEC) - return copy_rtx (x); const RTX_CODE code = GET_CODE (x); int i; -- 2.30.2