From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67632 invoked by alias); 26 Jun 2015 07:47:39 -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 67623 invoked by uid 89); 26 Jun 2015 07:47:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 26 Jun 2015 07:47:38 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7F2D2AAD1 for ; Fri, 26 Jun 2015 07:47:34 +0000 (UTC) Date: Fri, 26 Jun 2015 07:57:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH[2/n] Remove GENERIC stmt combining from SCCVN In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2015-06/txt/msg01894.txt.bz2 On Thu, 25 Jun 2015, Richard Biener wrote: > > This shows up in gcc.dg/tree-ssa/reassoc-13.c where the 'reassoc:' > case in fold_binary happily handles floats if flag_associative_math. > Thus here, too. > > Bootstrap & regtest ongoing on x86_64-unknown-linux-gnu. Applied with the additional * gfortran.dg/reassoc_3.f90: Adjust. Index: gcc/testsuite/gfortran.dg/reassoc_3.f90 =================================================================== --- gcc/testsuite/gfortran.dg/reassoc_3.f90 (revision 224938) +++ gcc/testsuite/gfortran.dg/reassoc_3.f90 (working copy) @@ -14,5 +14,4 @@ function test(a) end ! { dg-final { scan-tree-dump "b = 5" "original" } } -! { dg-final { scan-tree-dump "c_. = .a" "optimized" } } -! { dg-final { scan-tree-dump "return c_.;" "optimized" } } +! { dg-final { scan-tree-dump-times " = " 1 "optimized" } } > Richard. > > 2015-06-25 Richard Biener > > * match.pd: Allow associating FLOAT_TYPE_P when flag_associative_math. > > Index: gcc/match.pd > =================================================================== > --- gcc/match.pd (revision 224893) > +++ gcc/match.pd (working copy) > @@ -561,9 +578,10 @@ (define_operator_list swapped_tcc_compar > && !TYPE_OVERFLOW_SANITIZED (type)) > (convert @1))) > > - /* We can't reassociate floating-point or fixed-point plus or minus > - because of saturation to +-Inf. */ > - (if (!FLOAT_TYPE_P (type) && !FIXED_POINT_TYPE_P (type)) > + /* We can't reassociate floating-point unless -fassociative-math > + or fixed-point plus or minus because of saturation to +-Inf. */ > + (if ((!FLOAT_TYPE_P (type) || flag_associative_math) > + && !FIXED_POINT_TYPE_P (type)) > > /* Match patterns that allow contracting a plus-minus pair > irrespective of overflow issues. */ > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nuernberg)