This is the mail archive of the
mailing list for the GCC project.
Re: [PR/13274] Fold subregs that are produced by zero_extend
- From: Roger Sayle <roger at eyesopen dot com>
- To: bonzini at gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 19 Jan 2004 07:57:32 -0700 (MST)
- Subject: Re: [PR/13274] Fold subregs that are produced by zero_extend
On Mon, 19 Jan 2004, Paolo Bonzini wrote:
> 2004-01-19 Paolo Bonzini <firstname.lastname@example.org>
> * 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
* cse.c (fold_rtx) <SUBREG>: Fold high part of a