This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] xstormy16_expand_arith vs try_split
- From: Geoff Keating <geoffk at geoffk dot org>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 20 Mar 2003 21:58:18 -0800
- Subject: Re: [patch] xstormy16_expand_arith vs try_split
- References: <200303210530.h2L5Ueg23191@greed.delorie.com>
DJ Delorie <dj at redhat dot com> writes:
> There are a few cases where xstormy16_expand_arith doesn't emit *any*
> insns (for example, (set (reg) (plus (same-reg) (const_int 0)))).
> However, if we emit no insns, get_insn() returns NULL in insn-emit.c
> (the DONE for addsi3), so try_split() eventually thinks we failed to
> split the insn. So, if we detect that we emitted no insns, at least
> emit a no-op so that we don't crash.
>
> I can think of a couple other ways to fix this, but this one was the
> simplest and least intrusive.
>
> * config/stormy16/stormy16.c (xstormy16_expand_arith): Make
> sure we always emit at least one insn.
This is OK.
--
- Geoffrey Keating <geoffk at geoffk dot org>