From patchwork Sun Jul 26 17:00:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 500082 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 CC7E81402ED for ; Mon, 27 Jul 2015 03:00:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=FCvZCMsn; 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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=ysTUjhCBps19eK7rGZGDYWUaYkFikyg3I3toXq3qSlCoxT iQz/9FosK+P1PvKgJ5WRFTurvbNYk7bROu0KEOMQokIYmscG1C90o/iZMsl0eG7y JArxtQapH2zyAuwU4MEFzh6uSh56oAVOTA/OFij//FDx0jPZoMO3jIMpEAX40= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=MK3Xj38/0KUnugi83UrRFWJwDEU=; b=FCvZCMsnbWS0KO0Lg0Nf 27mqXRyhA0wdjrsvz0EwQX4jCxlayxmkyV/Yi46VM10z9VknJr6deeqE71F4h77P gDytLnZK9CnqDPXNg6VvUE3YAZVrKHzO66yutDHO9v6socFp+wR5lG1EvsXdOerU EwILWBc+igRbRMbbmXjpoI8= Received: (qmail 39797 invoked by alias); 26 Jul 2015 17:00:46 -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 39785 invoked by uid 89); 26 Jul 2015 17:00:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 26 Jul 2015 17:00:43 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52336) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ZJPI1-0000FS-Ju for gcc-patches@gnu.org; Sun, 26 Jul 2015 13:00:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJPHw-0001yF-Rv for gcc-patches@gnu.org; Sun, 26 Jul 2015 13:00:41 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:43774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJPHw-0001xx-Lv for gcc-patches@gnu.org; Sun, 26 Jul 2015 13:00:36 -0400 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZJPHv-0006j3-IM from Tom_deVries@mentor.com for gcc-patches@gnu.org; Sun, 26 Jul 2015 10:00:35 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Sun, 26 Jul 2015 18:00:33 +0100 Message-ID: <55B51220.4040506@mentor.com> Date: Sun, 26 Jul 2015 19:00:16 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "gcc-patches@gnu.org" Subject: [PATCH] Enable fixed-point reductions in graphite X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 Hi, In patch "Don't allow unsafe reductions in graphite" ( submitted https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01861.html , committed r226193) we've disabled fixed-point reductions. In this patch we enable it again, for the case that it's safe, in other words, for the case that the fixed point overflow wraps. The patch uses FIXED_POINT_TYPE_OVERFLOW_WRAPS_P, introduced in proposed patch https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02049.html . Bootstrapped and reg-tested on x86_64. OK for trunk? Thanks, - Tom Enable fixed-point reductions in graphite 2015-07-24 Tom de Vries * graphite-sese-to-poly.c (is_reduction_operation_p): Allow wrapping fixed-point operations. --- gcc/graphite-sese-to-poly.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 531c848..aa823f8 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -2626,6 +2626,9 @@ is_reduction_operation_p (gimple stmt) return false; } + if (FIXED_POINT_TYPE_P (type)) + return FIXED_POINT_TYPE_OVERFLOW_WRAPS_P (type); + return false; } -- 1.9.1