This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] xstormy16_expand_arith vs try_split


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]