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: new sign/zero extension elimination pass


Andrew,

Andrew Pinski wrote:
> On Thu, Oct 28, 2010 at 12:03 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>> On Mon, Oct 18, 2010 at 8:36 AM, Tom de Vries <tom@codesourcery.com> wrote:
>>> I created a new sign/zero extension elimination pass.
>>>
>>> The motivating example for this pass is:
>> In the above case fwprop could do the majority of the work.  In fact
>> it simplifies the (subreg (zero_extend (subreg))) into (subreg) but
>> does not replace it.  I think you could extend fwprop to the correct
>> thing.
> 
> Something like the attached patch.  I have not bootstrap/tested it yet
> but it works for your simple example.
> This allows us not to add another pass.
> 
> Thanks,
> Andrew Pinski
> 

thanks for this patch.

I agreed with Paolo in http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01897.html
that for the example with which I submitted the pass initially, it would make
sense to handle it in fwprop. However, I also think that for the example
mentioned in http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01796.html, that
wouldn't work, so we still need the new pass.

Thanks,
- Tom


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