From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26931 invoked by alias); 25 Aug 2015 12:54:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26913 invoked by uid 89); 25 Aug 2015 12:54:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f176.google.com Received: from mail-yk0-f176.google.com (HELO mail-yk0-f176.google.com) (209.85.160.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 25 Aug 2015 12:54:30 +0000 Received: by ykll84 with SMTP id l84so153869627ykl.0 for ; Tue, 25 Aug 2015 05:54:28 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.13.244.134 with SMTP id d128mr36803064ywf.27.1440507268604; Tue, 25 Aug 2015 05:54:28 -0700 (PDT) Received: by 10.37.85.213 with HTTP; Tue, 25 Aug 2015 05:54:28 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Aug 2015 13:12:00 -0000 Message-ID: Subject: Re: Move remaining flag_unsafe_math_optimizations using simplify and match From: Richard Biener To: "Hurugalawadi, Naveen" Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01493.txt.bz2 On Tue, Aug 25, 2015 at 5:29 AM, Hurugalawadi, Naveen 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 > > * 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.