From: Eric Botcazou Date: Wed, 11 Sep 2019 10:44:06 +0000 (+0000) Subject: re PR rtl-optimization/89795 (wrong code with -O2 -fno-dce -fno-forward-propagate... X-Git-Tag: releases/gcc-7.5.0~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33b4a04318434299215b71edbb06fd88efedebf1;p=thirdparty%2Fgcc.git re PR rtl-optimization/89795 (wrong code with -O2 -fno-dce -fno-forward-propagate -fno-sched-pressure) PR rtl-optimization/89795 * rtlanal.c (nonzero_bits1) : Do not propagate results from inner REGs to paradoxical SUBREGs if WORD_REGISTER_OPERATIONS is set. From-SVN: r275638 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18be6a493ce6..ad4384a37c3b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-09-11 Eric Botcazou + + PR rtl-optimization/89795 + * rtlanal.c (nonzero_bits1) : Do not propagate results from + inner REGs to paradoxical SUBREGs if WORD_REGISTER_OPERATIONS is set. + 2019-09-09 Jakub Jelinek PR target/87853 diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 5642c0d6fcf4..bf1c42a8aa1b 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -4636,7 +4636,7 @@ nonzero_bits1 (const_rtx x, machine_mode mode, const_rtx known_x, || ((extend_op = load_extend_op (inner_mode)) == SIGN_EXTEND ? val_signbit_known_set_p (inner_mode, nonzero) : extend_op != ZERO_EXTEND) - || (!MEM_P (SUBREG_REG (x)) && !REG_P (SUBREG_REG (x)))) + || !MEM_P (SUBREG_REG (x))) && GET_MODE_PRECISION (GET_MODE (x)) > GET_MODE_PRECISION (inner_mode)) nonzero diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 332294c99d69..d24390fb2ba3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2019-09-11 Eric Botcazou + + * gcc.target/sparc/20161111-1.c: XFAIL redundant zero-extension test. + 2019-09-10 Iain Sandoe Backport from mainline. diff --git a/gcc/testsuite/gcc.target/sparc/20161111-1.c b/gcc/testsuite/gcc.target/sparc/20161111-1.c index eda8b0a9f125..8195fec89902 100644 --- a/gcc/testsuite/gcc.target/sparc/20161111-1.c +++ b/gcc/testsuite/gcc.target/sparc/20161111-1.c @@ -14,4 +14,4 @@ unsigned char ee_isdigit2(unsigned int i) return retval; } -/* { dg-final { scan-assembler-not "and\t%" } } */ +/* { dg-final { scan-assembler-not "and\t%" { xfail *-*-* } } } */