From patchwork Tue Jun 21 14:16:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Andre Vieira (lists)" X-Patchwork-Id: 638730 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 3rYqY9206dz9sdQ for ; Wed, 22 Jun 2016 00:17:01 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=f+2mf9lW; 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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=luhdN/MvYgfkzSNITZnsl/hkV4Tn86vF29BWupX+SUc1ie7Iy/ VOVILiQ3SKS/deYQXWenr+x+qJQne3c8aSxkY0ILi5wCUA6Xf4+pUF2PuYw3W/7o 225j2jfiCCS4bJQ0t0r/jut3FoZJrC5bw0IRDVcukE1Kjtt0GRnbvFaNE= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=XP2EKVp+ji7EplVVKGnGamLuZcw=; b=f+2mf9lWkhfVcxQNP39W 6ta3+8sRsJG9JkK4dqLh/vjxkiGZ1SIS0QWVDt+VakXQhzsEddRxGxK/DXQjx/F0 I7TfxygxqP8YGu7vCzRNz0qB/dehNygU1LJXHX/GDzrH01IpxazOfrPKEs53766u Uv6B0kPxrFrCefN1uITCrtQ= Received: (qmail 38537 invoked by alias); 21 Jun 2016 14:16:52 -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 38517 invoked by uid 89); 21 Jun 2016 14:16:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1436, dias X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Jun 2016 14:16:41 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F3F2A93A for ; Tue, 21 Jun 2016 07:17:25 -0700 (PDT) Received: from [10.2.206.221] (e107157-lin.cambridge.arm.com [10.2.206.221]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 756E63F445 for ; Tue, 21 Jun 2016 07:16:39 -0700 (PDT) To: GCC Patches From: "Andre Vieira (lists)" Subject: [PATCH][ARM] Updating testcase unsigned-extend-2.c Message-ID: <57694C46.60802@arm.com> Date: Tue, 21 Jun 2016 15:16:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 X-IsSubscribed: yes Hello, After some changes to GCC this test no longer tests the desired code generation behavior. The generated assembly is better than it used to be, but it has become too smart. I add an extra parameter to make sure GCC can't optimize away the loop. Tested for arm-none-eabi-gcc with a Cortex-M3 target. Is this OK? Cheers, Andre gcc/ChangeLog 2016-06-21 Andre Vieira * gcc.target/arm/unsigned-extend-2.c: Update testcase. From 12da0a48045b37efb2e459116ec81cc7117a0981 Mon Sep 17 00:00:00 2001 From: Andre Simoes Dias Vieira Date: Mon, 20 Jun 2016 14:27:06 +0100 Subject: [PATCH] fix testcase --- gcc/testsuite/gcc.target/arm/unsigned-extend-2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c b/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c index b610b73617dc6e6a5428c966380516007a02acba..013240749ecaabf0d2e8ad802d27c7edc69d8828 100644 --- a/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c +++ b/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c @@ -2,13 +2,13 @@ /* { dg-require-effective-target arm_thumb2_ok } */ /* { dg-options "-O" } */ -unsigned short foo (unsigned short x) +unsigned short foo (unsigned short x, unsigned short c) { unsigned char i = 0; for (i = 0; i < 8; i++) { x >>= 1; - x &= 0x7fff; + x &= c; } return x; } -- 1.9.1