From patchwork Tue Oct 20 16:38:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andre Vieira (lists)" X-Patchwork-Id: 533076 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 D96A51402D1 for ; Wed, 21 Oct 2015 03:38:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=AyAddG0c; 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 :subject:references:to:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=sUMWv+QvuPzVsfiQ1 d2mYC0DNUFDEDK+byNXZreL1jmizcEgCCyHyvT+5mKqVilFiNeZeHS9fYAGwGXAl nJa5LKhSdJX7N6GGAyr6D/IP3V4BWlKf3vQzoTFV9mmRynJnRjFRB+cNTJgp1m04 XDtFUJkL0YTEdn0EeuOtRSkQ3E= 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 :subject:references:to:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=8vHWTaXkgc5PwsVJRMZ1cDn KWFM=; b=AyAddG0c3HRJxLVYMgVH044eBb4+gXaR9ReapUTj4CxADZarQwpPZsS p8kI/lk+vp/1iyW7psIH/Bup/VYBcO6mDd9EtiGsJMQ6ulOAxSkYGEifgLcQ3XoC IEtuxpzW+XYT0PyWqjrt4bGYLiuszE/NFOnQobb8yGeAiIIaUPEE= Received: (qmail 55178 invoked by alias); 20 Oct 2015 16:38:38 -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 55165 invoked by uid 89); 20 Oct 2015 16:38:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Oct 2015 16:38:36 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-14-kSMcEJkvQByQDEkq3gU9lQ-1; Tue, 20 Oct 2015 17:38:31 +0100 Received: from [10.2.207.14] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Oct 2015 17:38:31 +0100 Subject: Re: [PATCH][ARM] Fix for testcase after r228661 References: <56266336.7020701@arm.com> To: GCC Patches From: Andre Vieira Message-ID: <56266E07.6040108@arm.com> Date: Tue, 20 Oct 2015 17:38:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: X-MC-Unique: kSMcEJkvQByQDEkq3gU9lQ-1 X-IsSubscribed: yes On 20/10/15 17:25, Ramana Radhakrishnan wrote: > On Tue, Oct 20, 2015 at 4:52 PM, Andre Vieira > wrote: >> Hi, >> >> This patch addresses PR-67948 by changing the xor-and.c test, initially >> written for a simplify-rtx pattern, to make it pass post r228661 (see >> https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00676.html). This test no >> longer triggered the simplify-rtx pattern it was written for prior to >> r228661, though other optimizations did lead to the same assembly the test >> checked for. The optimization added with r228661 matches the pattern used in >> the test and optimizes it to a better and still valid sequence. Being unable >> to easily change the test to trigger the original simplify-rtx pattern, I >> chose to change it to pass with the new produced assembly sequence. >> >> This is correct because the transformation is valid and it yields a more >> efficient pattern. However, as I pointed out before this test doesn't test >> the optimization it originally was intended for. >> >> Tested by running regression tests for armv6. >> >> Is this OK to commit? >> > > Missing Changelog - please remember to put the PR number in the > Changelog in the correct format i.e PR testsuite/67948. Ok with that. > > I suspect that the simplify-rtx.c is much less likely to trigger given > your match.pd change, but it will be fun proving that. Ideally, I'd like to prove the simplify-rtx.c couldn't be triggered anymore. Though I wouldn't know where to begin with that. I did spend a tiny effort trying to trigger it with a version before the match.pd change, but with no success. > > regards > ramana > > >> Thanks, >> Andre > Here is the ChangeLog (with the PR), sorry for that! gcc/testsuite/ChangeLog 2015-10-15 Andre Vieira PR testsuite/67948 * gcc.target/arm/xor-and.c: check for eor instead of orr. From 89922547118e716b41ddf6edefb274322193f25c Mon Sep 17 00:00:00 2001 From: Andre Simoes Dias Vieira Date: Thu, 15 Oct 2015 12:48:26 +0100 Subject: [PATCH] Fix for xor-and.c test --- gcc/testsuite/gcc.target/arm/xor-and.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/xor-and.c b/gcc/testsuite/gcc.target/arm/xor-and.c index 53dff85f8f780fb99a93bbcc24180a3d0d5d3be9..3715530cd7bf9ad8abb24cb21cd51ae3802079e8 100644 --- a/gcc/testsuite/gcc.target/arm/xor-and.c +++ b/gcc/testsuite/gcc.target/arm/xor-and.c @@ -10,6 +10,6 @@ unsigned short foo (unsigned short x) return x; } -/* { dg-final { scan-assembler "orr" } } */ +/* { dg-final { scan-assembler "eor" } } */ /* { dg-final { scan-assembler-not "mvn" } } */ /* { dg-final { scan-assembler-not "uxth" } } */ -- 1.9.1