From: Jan Hubicka Date: Thu, 20 Jun 2002 14:46:34 +0000 (+0200) Subject: combine.c (gen_lowpart_for_combine): Avoid calling of simplify_gen_subreg on VOIDmode. X-Git-Tag: releases/gcc-3.1.1~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=309d5638767cff53e98bd1c403a24ab8e240b004;p=thirdparty%2Fgcc.git combine.c (gen_lowpart_for_combine): Avoid calling of simplify_gen_subreg on VOIDmode. * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a2f57fb6cd5..e917679fa0c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Thu Jun 20 16:41:40 CEST 2002 Jan Hubicka + + * 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 * c-common.c (c_common_get_alias_set): Correctly handle characters. diff --git a/gcc/combine.c b/gcc/combine.c index 44bcdee6c190..acaf3b15869a 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -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)