This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Move remaining flag_unsafe_math_optimizations using simplify and match
- 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, 25 Aug 2015 14:54:28 +0200
- Subject: Re: Move remaining flag_unsafe_math_optimizations using simplify and match
- Authentication-results: sourceware.org; auth=none
- References: <SN2PR0701MB10248A6A4DCCC536CFA6E0538E610 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com>
On Tue, Aug 25, 2015 at 5:29 AM, Hurugalawadi, Naveen
<Naveen.Hurugalawadi@caviumnetworks.com> wrote:
> Hi,
>
> Please find attached the remaining part of patch.
>
> Tested the patch on AArch64 and X86 without any regressions.
>
> Please review the patch and let me know if any modifications are required.
Ok.
Thanks,
Richard.
> Thanks,
> Naveen
>
> ChangeLog
>
> 2015-08-25 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
>
> * fold-const.c (fold_binary_loc) : Move Optimize
> root(x)*root(y) as root(x*y) to match.pd.
> Move Optimize expN(x)*expN(y) as expN(x+y) to match.pd.
> Move Optimize pow(x,y)*pow(x,z) as pow(x,y+z) to match.pd.
> Move Optimize a/root(b/c) into a*root(c/b) to match.pd.
> Move Optimize x/expN(y) into x*expN(-y) to match.pd.
>
> * match.pd (mult (root:s @0) (root:s @1)): New simplifier.
> (mult (POW:s @0 @1) (POW:s @0 @2)) : New simplifier.
> (mult (exps:s @0) (exps:s @1)) : New simplifier.
> (rdiv @0 (root:s (rdiv:s @1 @2))) : New simplifier.
> (rdiv @0 (exps:s @1)) : New simplifier.