From patchwork Tue Dec 20 16:42:40 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: 707504 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 3tjk9h1slqz9tkk for ; Wed, 21 Dec 2016 03:43:03 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="is4dnIed"; 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:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=fiJGTPJnVPt4EjZK4 be3BAFt+w4Ft5sLa6abg1OkN4gv8MtcCZnLx+EYk25L11/bCF2NSqvNFH7lXwj2o Yh1Z/GMOlgb42K93S+akGcK2uo0QjGPuE0C+SxVgucgF3NtjHA/BW/8aPvsKlP5E 6gGhaSmkeiPR44tifkYa7SbXzg= 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:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=/P0s99k+J9OsJjBVqnIUcyi 4q3E=; b=is4dnIedhzT3Gff8LgEgVs7uzzAu7HhSoBH5DuvWD599A74F10o4XL+ u1rzzWxKXWus0OL8KpnSmjcDwqD4DSePWErpaczAroCTScCOPGfDc7dI+gr3JK92 Oij19AHYpRgi5uSabwwhi3mkG8bCXKimh2bkXl9m4wmK7CHA2Tx0= Received: (qmail 47673 invoked by alias); 20 Dec 2016 16:42:55 -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 47645 invoked by uid 89); 20 Dec 2016 16:42:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1385 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, 20 Dec 2016 16:42:44 +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 EBBC1F; Tue, 20 Dec 2016 08:42:42 -0800 (PST) Received: from [10.2.206.251] (e107157-lin.cambridge.arm.com [10.2.206.251]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7C77C3F24D; Tue, 20 Dec 2016 08:42:42 -0800 (PST) Subject: [ARM][committed] Fix for PR78255-2.c testism for targets that do not optimize for tailcall To: Christophe Lyon , GCC Patches References: <584AB9AA.6030800@arm.com> <334ff580-3e7d-22fb-83da-da18acd84244@redhat.com> <584ACF02.9070101@arm.com> <584AD8E9.3000406@arm.com> From: "Andre Vieira (lists)" Message-ID: <58595F80.3070204@arm.com> Date: Tue, 20 Dec 2016 16:42:40 +0000 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-IsSubscribed: yes On 12/12/16 09:04, Christophe Lyon wrote: >> > > The new test (gcc.target/arm/pr78255-2.c scan-assembler b\\s+bar) > added at r243494 fails on old arm architectures, such as: > * arm-none-linux-gnueabi, forcing -march=armv5t in runtestflags > * arm-none-eabi with default cpu/fpu/mode > > Christophe Hi, Thank you for reporting this Christophe and sorry for the delay. The scan check obviously will not work for targets that do not optimize tailcalls. So I applied this patch as obvious in revision r243826, such that the test also accepts direct non-tailcalls, i.e. 'bl?' rather than 'b'. The test is really to make sure a direct call is not turned into an indirect call. gcc/testsuite/ChangeLog: 2016-12-20 Andre Vieira * gcc.target/arm/pr78255-2.c: Fix to work for targets that do not optimize for tailcall. diff --git a/gcc/testsuite/gcc.target/arm/pr78255-2.c b/gcc/testsuite/gcc.target/arm/pr78255-2.c index efa01e750b3962497cccb05ab9862fd3935397a3..cc1c1801c37ee103da90df940a673ceeac2772ed 100644 --- a/gcc/testsuite/gcc.target/arm/pr78255-2.c +++ b/gcc/testsuite/gcc.target/arm/pr78255-2.c @@ -9,4 +9,4 @@ foo (void) return bar ((void*)bar); } -/* { dg-final { scan-assembler "b\\s+bar" } } */ +/* { dg-final { scan-assembler "bl?\\s+bar" } } */