]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
combine.c (gen_lowpart_for_combine): Avoid calling of simplify_gen_subreg on VOIDmode.
authorJan Hubicka <jh@suse.cz>
Thu, 20 Jun 2002 14:46:34 +0000 (16:46 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 20 Jun 2002 14:46:34 +0000 (14:46 +0000)
* combine.c (gen_lowpart_for_combine): Avoid calling of
simplify_gen_subreg on VOIDmode.

* combine.c (subst): Be prepared for simplify_subreg to return VOIDmode.

From-SVN: r54833

gcc/ChangeLog
gcc/combine.c

index 4a2f57fb6cd53bb965d3a85c46c0de7c53cde6da..e917679fa0c0749c9475d5c402ef1ed39158030f 100644 (file)
@@ -1,3 +1,10 @@
+Thu Jun 20 16:41:40 CEST 2002  Jan Hubicka  <jh@suse.cz>
+
+       * combine.c (gen_lowpart_for_combine): Avoid calling of
+       simplify_gen_subreg on VOIDmode.
+
+       * combine.c (subst): Be prepared for simplify_subreg to return VOIDmode.
+
 2002-06-20  Richard Henderson  <rth@redhat.com>
 
        * c-common.c (c_common_get_alias_set): Correctly handle characters.
index 44bcdee6c190682a51b670e22bc828c8dcbbd596..acaf3b15869af64b8e640106dbc803c7cd653c7c 100644 (file)
@@ -3539,11 +3539,12 @@ subst (x, from, to, in_dest, unique_copy)
 
              if (GET_CODE (new) == CONST_INT && GET_CODE (x) == SUBREG)
                {
-                 x = simplify_subreg (GET_MODE (x), new,
+                 enum machine_mode mode = GET_MODE (x);
+                 x = simplify_subreg (mode, new,
                                       GET_MODE (SUBREG_REG (x)),
                                       SUBREG_BYTE (x));
                  if (! x)
-                   abort ();
+                   x = gen_rtx_CLOBBER (mode, const0_rtx);
                }
              else if (GET_CODE (new) == CONST_INT
                       && GET_CODE (x) == ZERO_EXTEND)
@@ -9846,6 +9847,12 @@ gen_lowpart_for_combine (mode, x)
       int offset = 0;
       rtx res;
 
+      /* We can't handle VOIDmodes.  We can get here when generating vector
+        modes since these, unlike integral and floating point modes are not
+        handled earlier.  */
+      if (GET_MODE (x) == VOIDmode)
+       return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
+
       offset = subreg_lowpart_offset (mode, GET_MODE (x));
       res = simplify_gen_subreg (mode, x, GET_MODE (x), offset);
       if (res)