From patchwork Thu Oct 23 16:53:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Lawrence X-Patchwork-Id: 402596 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 A388A14007D for ; Fri, 24 Oct 2014 03:53:17 +1100 (AEDT) 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:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=Gth4h7RsSXu9OFHw7 GXf8dZiX53xCLgPPXlzXfktcfm6EpOTlPznM9CZz/zTEp6oyB9A5CFWuqOvNtL2M bG4RG+DmGMdkKdEkKE3fHnyaYnfg3zIGhWfgwBHc5UJS6S3Hz32j1UvT/p6L4jQI Io+xeicp8ZE9vGDELh41KpCZvg= 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:cc:subject:references :in-reply-to:content-type; s=default; bh=WULKHq4TR5AaQ5F1/5a29xC /jQU=; b=JqSKYiQmqmqVDaAoWXVLuUKof8WqOYrRkAYXKuVt4pM1ZBZCVULAxsx aS9VDqOI2T9cr7jwOg4FN+AAx6h+Ivmaf+mculATGicpBxasez1VlNkENjgcH/LI Y54Q4blswNuKD0pQmbAAPxvt1QCX+i5ywbz/UWZm3mIYIxQRtIQc= Received: (qmail 24982 invoked by alias); 23 Oct 2014 16:53:08 -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 24969 invoked by uid 89); 23 Oct 2014 16:53:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Oct 2014 16:53:04 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 23 Oct 2014 17:53:02 +0100 Received: from [10.1.209.51] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 23 Oct 2014 17:52:59 +0100 Message-ID: <5449326C.9040301@arm.com> Date: Thu, 23 Oct 2014 17:53:00 +0100 From: Alan Lawrence User-Agent: Thunderbird 2.0.0.24 (X11/20101213) MIME-Version: 1.0 To: Rainer Orth , Andreas Schwab , "gcc-patches@gcc.gnu.org" CC: Jeff Law Subject: RE: [PATCH] Relax check against commuting XOR and ASHIFTRT in combine.c References: <53B1B4FE.7010201@arm.com> <53B1D271.5000405@redhat.com> <53C69926.4050503@arm.com> <53C80023.6000100@arm.com> <5409FBB1.3040509@redhat.com> <541AA89C.9070005@arm.com> <87ppe70wld.fsf@igel.home>, In-Reply-To: X-MC-Unique: 114102317530200501 X-IsSubscribed: yes Mmmm, I've made a few attempts at filtering according to LP64 and ILP32, but not managed to get anything working so far (that is, I've ended up with the test not being executed on platforms where it should)....ah, I see now where I've been going wrong, patch attached. The original intent was pretty much to execute the test on everything with the appropriate word size, i.e. where a 64-bit comparison would be done in 64 bits rather than emulated in 2*32; and for 32-bit where that was not sign-extended to 64 (or some other such problem). The architectures I wrote in the file, were those on which I tested the rtl dump, excluding some archs where you get (neg (lt 0 x)) rather than (neg (ge x 0)); but the latter really shouldn't be a problem, it should be possible to use a regex matching either form, and then drop the target selection. However, as a quick first step, does adding the ilp32 / lp64 (and keeping the architectures list for now) solve the immediate problem? Patch attached, OK for trunk? gcc/testsuite/ChangeLog: * gcc.dg/combine_ashiftrt_1.c: require-effective-target LP64 * gcc.dg/combine_ashiftrt_2.c: require-effective-target ILP32 --Alan commit 43e8585f475dff386d245cb150940755cd9b43d9 Author: Alan Lawrence Date: Thu Oct 23 17:41:28 2014 +0100 Add ILP32 / LP64 diff --git a/gcc/testsuite/gcc.dg/combine_ashiftrt_1.c b/gcc/testsuite/gcc.dg/combine_ashiftrt_1.c index 90e64fd..cb669c9 100644 --- a/gcc/testsuite/gcc.dg/combine_ashiftrt_1.c +++ b/gcc/testsuite/gcc.dg/combine_ashiftrt_1.c @@ -1,4 +1,5 @@ /* { dg-do compile {target sparc64*-*-* aarch64*-*-* x86_64-*-* powerpc64*-*-*} } */ +/* { dg-require-effective-target lp64 } */ /* { dg-options "-O2 -fdump-rtl-combine-all" } */ typedef long long int int64_t; diff --git a/gcc/testsuite/gcc.dg/combine_ashiftrt_2.c b/gcc/testsuite/gcc.dg/combine_ashiftrt_2.c index fd6827c..6bd6f2f 100644 --- a/gcc/testsuite/gcc.dg/combine_ashiftrt_2.c +++ b/gcc/testsuite/gcc.dg/combine_ashiftrt_2.c @@ -1,4 +1,5 @@ /* { dg-do compile {target arm*-*-* i?86-*-* powerpc-*-* sparc-*-*} } */ +/* { dg-require-effective-target ilp32} */ /* { dg-options "-O2 -fdump-rtl-combine-all" } */ typedef long int32_t;