]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/89795 (wrong code with -O2 -fno-dce -fno-forward-propagate...
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 11 Sep 2019 10:44:06 +0000 (10:44 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 11 Sep 2019 10:44:06 +0000 (10:44 +0000)
PR rtl-optimization/89795
* rtlanal.c (nonzero_bits1) <SUBREG>: Do not propagate results from
inner REGs to paradoxical SUBREGs if WORD_REGISTER_OPERATIONS is set.

From-SVN: r275638

gcc/ChangeLog
gcc/rtlanal.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/sparc/20161111-1.c

index 18be6a493ce6dae9c9efd56894a8263abf72b3df..ad4384a37c3b29d818953476de8f266adac7249e 100644 (file)
@@ -1,3 +1,9 @@
+2019-09-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR rtl-optimization/89795
+       * rtlanal.c (nonzero_bits1) <SUBREG>: Do not propagate results from
+       inner REGs to paradoxical SUBREGs if WORD_REGISTER_OPERATIONS is set.
+
 2019-09-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/87853
index 5642c0d6fcf42e5136d1c97a78773ef260775036..bf1c42a8aa1b79c7482d86d1850549c2c5296c6b 100644 (file)
@@ -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
index 332294c99d699bfc459e2611deb49e0831a63c16..d24390fb2ba336426e068e681b0710206c0ae854 100644 (file)
@@ -1,3 +1,7 @@
+2019-09-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.target/sparc/20161111-1.c: XFAIL redundant zero-extension test.
+
 2019-09-10  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline.
index eda8b0a9f1252e1b199a665c8586741e0886108a..8195fec899029e98853a753e63b0b71b2f3481c0 100644 (file)
@@ -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 *-*-* } } } */