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: [PR/13274] Fold subregs that are produced by zero_extend

Hi Paolo,

On Mon, 19 Jan 2004, Paolo Bonzini wrote:
> 2004-01-19  Paolo Bonzini  <>
>        PR/13274
>        * cse.c (fold_rtx:SUBREG):  Fold high part of a
>        narrowing SUBREG to zero if its operand is equivalent
>        to a ZERO_EXTEND.

Do you have a copyright assignment on file for GCC?  I see you've
assignments for autoconf, automake, sed and smalltalk, but for a
patch of this size, you really need a GCC assignment as well.

I do have one suggestion though.  Could you also try implementing this
optimization in simplify_subreg in simplify_rtx.c?  If the optimization
of a high-part SUBREG of a ZERO_EXTEND were made there, it would not
only benefit CSE, but also GCSE, combine, reload and the rest of the
compiler.  See the comment above simplify_rtx on why placing new
optimizations (and moving old optimizations) there is preferred.

If for some reason, changing simplify_subreg doesn't improve the
code we generate for "unsigned int * long long", I'll gladly review
this fold_rtx change, once the paperwork is sorted out.

Finally, the ChangeLog entry should read

	PR optimization/13724
        * cse.c (fold_rtx) <SUBREG>:  Fold high part of a

Many thanks,


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