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] gen_lowpart and lvalues


On Thu, 24 Feb 2005, Richard Henderson wrote:
> Right or wrong, I'd guess that > 50% of all uses of gen_lowpart
> expect lvalue semantics.  You've simply got to accept that.

Conceded.  I'll investigate some way of reverting my patch with out
introducing a 1% slow-down on the compiler, and also still be able
to optimize "var = 0; return x + (short)var".

However...

> On Thu, Feb 24, 2005 at 04:32:36PM -0700, Roger Sayle wrote:
> > 1.1  (law 11-Aug-97): /* Must be a hard reg that's not valid in MODE.  */
> > 1.1  (law 11-Aug-97): result = gen_lowpart_common (mode, copy_to_reg (x));
>
> Not an lvalue to begin with.

at this point GET_CODE (x) is a REG, which is obviously an lvalue.
It should even be possible to trigger this in gcc-2.9x using a local
register variable to a hard FP register that isn't MODES_TIEABLE_P to
its intended use.

Roger
--


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