From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92657 invoked by alias); 23 Nov 2016 19:38:03 -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 92601 invoked by uid 89); 23 Nov 2016 19:38:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sum X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Nov 2016 19:37:52 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7F5FC04B944 for ; Wed, 23 Nov 2016 19:37:51 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-64.phx2.redhat.com [10.3.116.64]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uANJbpk5000498; Wed, 23 Nov 2016 14:37:51 -0500 Subject: Re: [3/3] Fix PR78120, in ifcvt/rtlanal/i386. To: Bernd Schmidt , GCC Patches References: <36753dee-a20d-7c91-da3d-2394b29727e1@redhat.com> From: Jeff Law Message-ID: <54aa15a6-35b9-2a6b-061f-4a84e81074a1@redhat.com> Date: Wed, 23 Nov 2016 19:38:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <36753dee-a20d-7c91-da3d-2394b29727e1@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg02434.txt.bz2 On 11/23/2016 12:02 PM, Bernd Schmidt wrote: > On 11/23/2016 07:57 PM, Bernd Schmidt wrote: >> 3. ifcvt computes the sum of costs for the involved blocks, but only >> makes a before/after comparison when optimizing for size. When >> optimizing for speed, it uses max_seq_cost, which is an estimate >> computed from BRANCH_COST, which in turn can be zero for predictable >> branches on x86. > > This is the final patch and has the testcase. It also happens to be the > least risky of the series so it could be applied on its own (without the > test). > > > Bernd > > > 71280-3.diff > > > PR rtl-optimization/78120 > * ifcvt.c (noce_conversion_profitable_p): Check original cost in all > cases, and additionally test against max_seq_cost for speed > optimization. > (noce_process_if_block): Compute an estimate for the original cost when > optimizing for speed, using the minimum of then and else block costs. > > PR rtl-optimization/78120 > * gcc.target/i386/pr78120.c: New test. Also OK. Obviously Uros has the call on the x86 target change. Stage the series in as you see fit given the dependencies. jeff