Unrevied patches^3
Geoff Keating
geoffk@geoffk.org
Tue Oct 21 00:06:00 GMT 2003
> From: Richard Sandiford <rsandifo@redhat.com>
> Date: 20 Oct 2003 18:28:29 +0100
> Geoff Keating <geoffk@geoffk.org> writes:
> > (set (reg r2) (mem ...)) (REG_EQUIV (high (symbol_ref "x")))
>
> Right. That's exactly what MIPS port does. And from a correctness
> POV, it seems to work.
>
> The problem is that combine can optimise something like:
>
> (set (reg x) (high (symbol_ref "foo")))
> (set (reg y) (lo_sum (reg x) (symbol_ref "foo")))
> (set (reg z) (plus (reg y) (const_int 4)))
>
> into:
>
> (set (reg x) (high (const (plus (symbol_ref "foo") (const_int 4)))))
> (set (reg y)
> (lo_sum (reg x) (const (plus (symbol_ref "foo") (const_int 4)))))
>
> But it doesn't know how to do that when you use a mem for
> the high part. The point of this patch is to tell it.
Why not just do the obvious thing, and write a
define_insn/define_split pair?
--
- Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc-patches
mailing list