From patchwork Thu Jun 25 13:19:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 488450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 71F4A1402ED for ; Thu, 25 Jun 2015 23:19:21 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=etHoNUuf; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=BoR5cVH+UucE2tNiwgwaJKRB9HFqpqTl45uU90WVpQKt1pPzPapXz lJJ8m+0NqU3GufZw+ZYkVv//WYY/fFdBvalbJ5cUEyCblqGJ6tciw3suSh8uuk2b rNiFBgdGJJwncynPaD4Cn/ZYZHP7IV2t96rrsiFur6TO4CPyvzeJBc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=+Nk/DWKjMVQLJPyQLuxogr40+s4=; b=etHoNUufTgIdn0nmSX3i e3aA32YGnPmPdRJYWRccWGH5b4memRFzhAlyyzT6JBAv5094D+ChP2e9gXPBqV0u 1Crw5vdTjkPqA97aKmmpgykNDCSUF/x2iZRYMzr8X1o6dRZAOyX1cSGSI2Dw17qf pRCQTl8bhHIURC3givHUGbc= Received: (qmail 84740 invoked by alias); 25 Jun 2015 13:19:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 84725 invoked by uid 89); 25 Jun 2015 13:19:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham 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; Thu, 25 Jun 2015 13:19:10 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 54CDEABF2 for ; Thu, 25 Jun 2015 13:19:07 +0000 (UTC) Date: Thu, 25 Jun 2015 15:19:07 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH[2/n] Remove GENERIC stmt combining from SCCVN Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 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. 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. */