From patchwork Wed Apr 22 08:42:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Cheng X-Patchwork-Id: 463620 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 9059114007F for ; Wed, 22 Apr 2015 18:42:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=PTyjewnF; dkim-adsp=none (unprotected policy); 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:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=qZowZQfP5I0a9DxTsYdiC68LUU8pJ2oX22coNpbxwbSX1XCTcL76M sPkn6XloEYmrf6CIS/xc9pmfre/SlgtvfhE5pidqKX7ioh934PTazcfRcR18zdCf 3u0DGF3B39dwlwhc0StQNRc1joI2IXZpaspi+qZnlD+F7WQ/AmjcY0= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=mxB4RB9evHYhLX8jSPPZHNsVoPE=; b=PTyjewnFjvqpeYzEKWlQ 1DX3wu+Sr46imz04TeiCwRyVD5ZHFO19yhQe6qLxoCAzBwFB0RqrEAJTwXpltaRX vtJ3/62d4GYGePDBu1qWn0Jk4y9Ek1dSdGb0XO4Vtl02hyzbGSzEhz6DBT49wS26 OxykWNmKj5qAv8GFJ6Pz7To= Received: (qmail 2966 invoked by alias); 22 Apr 2015 08:42: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 2888 invoked by uid 89); 22 Apr 2015 08:42:37 -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: 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; Wed, 22 Apr 2015 08:42:36 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-22.uk.mimecast.lan; Wed, 22 Apr 2015 09:42:33 +0100 Received: from shawin233 ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 22 Apr 2015 09:42:33 +0100 From: "Bin Cheng" To: Subject: [PATCH ARM]Fix pr42172-1.c failure on pre armv7 processors Date: Wed, 22 Apr 2015 16:42:16 +0800 Message-ID: <000801d07cd8$42809e90$c781dbb0$@arm.com> MIME-Version: 1.0 X-MC-Unique: YcCRW3IPStKAxhXkazyjeA-1 X-IsSubscribed: yes Hi, Case pr42172-1.c failed on pre-armv7 processors because GCC actually generates better code without ldr instruction. This patch just refines test case by checking str instead of ldr, makes sure the case passes on all arm processors. In the end, we need to fix GCC combiner to generate optimal code on armv7 processors too. PR42172 is kept open for that purpose. This is obvious change, is it OK for branches too? gcc/testsuite/ChangeLog 2015-04-22 Bin Cheng * gcc.target/arm/pr42172-1.c: Check str instead of ldr. diff --git a/gcc/testsuite/gcc.target/arm/pr42172-1.c b/gcc/testsuite/gcc.target/arm/pr42172-1.c index 207f600..a3de02f 100644 --- a/gcc/testsuite/gcc.target/arm/pr42172-1.c +++ b/gcc/testsuite/gcc.target/arm/pr42172-1.c @@ -16,4 +16,4 @@ void init_A (struct A *this) this->f4 = 0; } -/* { dg-final { scan-assembler-times "ldr" 1 } } */ +/* { dg-final { scan-assembler-times "str" 1 } } */