This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: paradoxical subreg problem
- From: law at redhat dot com
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 28 Jan 2002 11:59:37 -0700
- Subject: Re: paradoxical subreg problem
- Reply-to: law at redhat dot com
In message <20020128105031.D25844@redhat.com>, Richard Henderson writes:
> On Mon, Jan 28, 2002 at 11:31:16AM -0700, law@redhat.com wrote:
> > I'll start simple. On a big endian machine, can this expression be optimi
> zed
> > into true/false at compile time, or must it be run-time computed?
> >
> > (eq (subreg:SI (mem/s:QI (plus:SI (reg:SI 3 %r3)
> > (const_int 15 [0xf])) 1) 0)
> > (mem/s:SI (plus:SI (reg:SI 3 %r3)
> > (const_int 12 [0xc])) 1))
> >
> >
> > Think very very carefully about the semantics of a paradoxical subreg.
>
> I'll remind you that we should only have subregs of memory during
> reload (while pseudos are being replaced), and even then we don't
> create paradoxical subregs of memory.
>
> So this is a "shouldn't happen"
More correctly, they're allowed between combine and reload inclusively. And
it's the combiner that is creating the paradoxical, then incorrectly
optimizing away a necessary comparison.
jeff