]> 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:42:31 +0000 (10:42 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 11 Sep 2019 10:42:31 +0000 (10:42 +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: r275636

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

index 1d55b05791aa5acc227fa969ab7e151ab6144e66..95f978d58059e2ead29cd4e8e1ab466823bacb48 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 268a38799d63c8c5a193b49d7fe7738e50894d41..01af063a222aa4466b8b9990b75e2a810a7a9e79 100644 (file)
@@ -4793,7 +4793,7 @@ nonzero_bits1 (const_rtx x, scalar_int_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)))
              && xmode_width > inner_width)
            nonzero
              |= (GET_MODE_MASK (GET_MODE (x)) & ~GET_MODE_MASK (inner_mode));
index a8480920d916218b319fca5783b4cd665aa504f2..9a424e463e46be9b2c35746bea4c5ad605ee856f 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-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/87853
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 *-*-* } } } */