This is the mail archive of the 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: Fix PR rtl-optimization/33822

Thanks for the review, now applied.

Eric Botcazou <> writes:
> Btw, could we do something clever for the many similar calculations in 
> alter_subreg and simplify_subreg (and maybe elsewhere):
>       /* The SUBREG_BYTE represents offset, as if the value were stored
> 	 in memory.  Irritating exception is paradoxical subreg, where
> 	 we define SUBREG_BYTE to be 0.  On big endian machines, this
> 	 value should be negative.  For a moment, undo this exception.  */
>       if (byte == 0 && GET_MODE_SIZE (innermode) < GET_MODE_SIZE (outermode))
> 	{
> 	  int difference = (GET_MODE_SIZE (innermode) - GET_MODE_SIZE (outermode));
> 	    final_offset += (difference / UNITS_PER_WORD) * UNITS_PER_WORD;
> 	    final_offset += difference % UNITS_PER_WORD;

TBH, I don't think the alter_subreg code should exist at all.
It implies that simplify_subreg is being too strict or that
reload is being too lax.

I'd rather get rid of the alter_subreg code (definitely not 4.3
material!) and fix any fallout.  Introducing a new function for the
above smacks too much of simplify_subreg_this_time_i_really_mean_it.


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