This is the mail archive of the
mailing list for the GCC project.
Re: SSE/MMX leaking to the integer code
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: SSE/MMX leaking to the integer code
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 04 Oct 2001 12:37:49 -0700
- CC: gcc at gcc dot gnu dot org
- References: <20011004163755.J18334@atrey.karlin.mff.cuni.cz>
Jan Hubicka <email@example.com> writes:
> Hi, i386.h is currently allowing DImode in the SSE2/MMX registers.
> This appears to be source of problems for me, because gcc sometimes
> decides to use SSE registers for integer work. The problem does not
> appear to be in register preferences, as SSE gets as expensive as
> memory there, but it seems to come from reload, for instance
> find_valid_class, that simply discover SSE_INT_REGS as valid for
> DImode (with SSE2 allowed).
> This usually results in unmatched insn, but sometimes in crash.
> Do you have any idea how to handle this?
Write appropriate insns? Fix the crashes?
Often when reload does this sort of thing, it is actually the most
efficient choice, because the alternative is to spill some other
register(s) to memory and then reload them again, so it costs two
memory operations plus the actual work.
> In fact, in the longer term, I would love to allow both DI and
> SImode values in SSE/MMX and teach gcc to use it when it runs out of
> integer registers and special flag is used. With my regclass
> inheritance patches it is possible (and possibly with new regalloc),
> but it appears to run into different problem - sometimes move from
> eliminable register to SSE appears and then reload constructs an
> "lea" pattern, but with SSE destination, that dies, since SSE is not
> able to sum.
> Is there some way around?
Another thing to consider is that perhaps PREFERRED_RELOAD_CLASS or
LIMIT_RELOAD_CLASS or one of those knobs could help. It's unlikely
that reload is starting with SSE_INT_REGS, it's probably starting with
something like GENERAL_REGS or ANY_REGS and discovering that a SSE
It might also be that we need to teach reload to check whether a sum
is a valid insn...
- Geoffrey Keating <firstname.lastname@example.org>