This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR25529] Convert (unsigned t * 2)/2 into unsigned (t & 0x7FFFFFFF)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: "Hurugalawadi, Naveen" <Naveen dot Hurugalawadi at caviumnetworks dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 11 Aug 2015 14:50:32 +0200
- Subject: Re: [PR25529] Convert (unsigned t * 2)/2 into unsigned (t & 0x7FFFFFFF)
- Authentication-results: sourceware.org; auth=none
- References: <SN2PR0701MB1024267AF107C82E4F2F8A6C8E920 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com> <alpine dot DEB dot 2 dot 20 dot 1507070800550 dot 1693 at laptop-mg dot saclay dot inria dot fr> <CAFiYyc1c_NVr1eKVg3v5xv4829aMDbp0QnrmeB-BEYCmg6uQ+A at mail dot gmail dot com> <alpine dot DEB dot 2 dot 20 dot 1507071121510 dot 1875 at laptop-mg dot saclay dot inria dot fr> <CAFiYyc07MCwT9NF_OQTE92KG0Rf+3Oex_muSRTx7Ji9TF99Jag at mail dot gmail dot com> <DM2PR0701MB1018959170F8B70E4C982C628E840 at DM2PR0701MB1018 dot namprd07 dot prod dot outlook dot com> <CAFiYyc2=EyQvrDK+4PfUMQwHLY1EK0ZDg5WoY+ZXQ8k5oP_7NQ at mail dot gmail dot com> <SN2PR0701MB1024E2FD81BA317E4CFFE98F8E820 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com> <CAFiYyc0t3O6fuRsST=PHVBM5+cG1ata+2r=B2b47WN=pMjyfqg at mail dot gmail dot com> <SN2PR0701MB1024C09A0E0C1C2885ABBEE68E730 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com>
On Fri, Aug 7, 2015 at 10:43 AM, Hurugalawadi, Naveen
<Naveen.Hurugalawadi@caviumnetworks.com> wrote:
> Hi,
>
>>> extend it - it should also work for non-INTEGER_CST
>>> divisors and it should work for any kind of division, not just exact_div.
>
> Please find attached the patch "pr25529.patch" that implements the pattern
> for all divisors
>
> Please review and let me know if its okay.
Ok.
Thanks,
Richard.
> Regression tested on AARH64 and x86_64.
>
> Thanks,
> Naveen
>
> 2015-08-07 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
>
> PR middle-end/25529
>
> gcc/ChangeLog:
> * match.pd (div (mult @0 @1) @1) : New simplifier.
>