fix subreg optimization bug introduced 2002-05-25
authorJim Wilson <wilson@redhat.com>
Thu, 19 Sep 2002 23:39:34 +0000 (23:39 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 19 Sep 2002 23:39:34 +0000 (16:39 -0700)
fix subreg optimization bug introduced 2002-05-25
* combine.c (simplify_set): When optimizing a subreg src with a
cc0 dest, use GET_MODE (src) for mask instead of inner_mode.

From-SVN: r57323

gcc/ChangeLog
gcc/combine.c

index 9da276c6810a44c5dfe6aec20aab340e45b58493..0b22646cb6c141bf234b707a9885c27877203398 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-19  Jim Wilson  <wilson@redhat.com>
+
+       * combine.c (simplify_set): When optimizing a subreg src with a
+       cc0 dest, use GET_MODE (src) for mask instead of inner_mode.
+
 2002-09-19  Dale Johannesen <dalej@apple.com>
        * combine.c (make_extraction): Don't create
        invalid subreg.
index c72d81e891cc7c286bdedf4667fca7f080fa33e6..23136194bf085b5e8363c885c2c891e36d2e8a7b 100644 (file)
@@ -5229,7 +5229,7 @@ simplify_set (x)
       if (GET_MODE_BITSIZE (inner_mode) <= HOST_BITS_PER_WIDE_INT
          && (nonzero_bits (inner, inner_mode)
              < ((unsigned HOST_WIDE_INT) 1
-                << (GET_MODE_BITSIZE (inner_mode) - 1))))
+                << (GET_MODE_BITSIZE (GET_MODE (src)) - 1))))
        {
          SUBST (SET_SRC (x), inner);
          src = SET_SRC (x);