From patchwork Mon Aug 24 15:32:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 510124 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 C53AB140280 for ; Tue, 25 Aug 2015 01:32:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=EEcKpKIT; 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:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=dkM1dUWwWAKHw66dU EpTN2tvPFpNmW0EuEPmam2VLEQQfI54ntoo5hm8+Aw+EenVYo5r/aR+aDU7Vz7tF WGnilHL+RTTe4+qDsWNpNdEOlk0yoF3/Zi8L2qEIv5isVSejKtgqmqK9yw9xkcDD q/0TK46lcnc+4gQwA/4tUUdExY= 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:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=3DOyEdeeEZNGtFrxj6Sodpx SFFU=; b=EEcKpKITEDv27+Ebfi1BVGnjvjFChieTpPF4XDTrUy+NbSp1Znp1Fkc VC5DKeWPhtevv1mM7gap/Lt3OQSO7SJc5fLN2N/3tj1royQwhO2mhQq0cHCrPC4k 573RfoL9/2OvuzJwSCV7+658vGE+6cYlbHC+h1YHih3ZRO4IbJmw= Received: (qmail 65875 invoked by alias); 24 Aug 2015 15:32:30 -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 65865 invoked by uid 89); 24 Aug 2015 15:32:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mga14.intel.com Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Aug 2015 15:32:29 +0000 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 24 Aug 2015 08:32:27 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([172.25.70.52]) by orsmga003.jf.intel.com with ESMTP; 24 Aug 2015 08:32:28 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 1000) id 7B297C391E; Mon, 24 Aug 2015 08:32:27 -0700 (PDT) Date: Mon, 24 Aug 2015 08:32:27 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org, Uros Bizjak Subject: Re: [PATCH] Adjust variable shift costs for IA MCU Message-ID: <20150824153227.GA20086@intel.com> Reply-To: "H.J. Lu" References: <20150709180527.GA29480@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150709180527.GA29480@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) On Thu, Jul 09, 2015 at 11:05:27AM -0700, H.J. Lu wrote: > We reduce code size for IA MCU by adjusting variable shift costs for IA > MCU. OK for trunk? > > Thanks. > > > H.J. > --- > PR target/66821 > * config/i386/i386.c (iamcu_cost): Adjust variable shift costs. I checked in this patch to add a testcase for PR target/66821. H.J. Index: ChangeLog =================================================================== --- ChangeLog (revision 227132) +++ ChangeLog (working copy) @@ -1,5 +1,10 @@ 2015-08-24 H.J. Lu + PR target/66821 + * gcc.target/i386/pr66821.c: New test. + +2015-08-24 H.J. Lu + PR target/67329 * gcc.target/i386/pr67329.c: New test. Index: gcc.target/i386/pr66821.c =================================================================== --- gcc.target/i386/pr66821.c (revision 0) +++ gcc.target/i386/pr66821.c (working copy) @@ -0,0 +1,15 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O2 -fdump-tree-optimized -mtune=iamcu" } */ + +void bar (void); + +void +foo (int x) +{ + if (x != 2 && x != 3 && x != 10 && x != 11 && x != 17 && x != 18 && x != 23) + bar (); +} + +/* Check if the tests have been folded into a bit test. */ +/* { dg-final { scan-tree-dump "(8784908|0x0*860c0c)" "optimized" } } */ +/* { dg-final { scan-tree-dump "(<<|>>)" "optimized" } } */