From patchwork Fri Jul 24 16:07:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Ye X-Patchwork-Id: 499797 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 35E22140A98 for ; Sat, 25 Jul 2015 02:08:10 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=uvxXEsLe; 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:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=uMdDI+3CgHE90QQJ TI7u/4+qQKnYK2G2svBWs4oIPdxq88Qa+Wle+jTG0NdK+GJey4vpQGhS1eVsiiC8 rvXCQQb8TR/MHMt//7LSBtDmkf24P93DgYn62tEvmiNcZr1y7vMUg+ElNjpTFPT3 PxAiBp5W1rTEtw5yhRrAdTjxoOA= 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:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=kxWhVVhldAzZL3SChWJMlj AhHAY=; b=uvxXEsLeY+qEd475Rwa9LY9DR2rYLcTO5zqZk0sTOlyCq3XrJYXBVO PCmEcfbL6BvMEgc1QVLPWxs/JdUm+ZM0MDqq89iKlY2NESgcerdBgTqxqFjG6kaK wjbdOlvnqEGH8oDdReUkMJ/UpHy7UT9gWw4nezHGHXp/M5s+Dm6lQ= Received: (qmail 124351 invoked by alias); 24 Jul 2015 16:07: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 124253 invoked by uid 89); 24 Jul 2015 16:07:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 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; Fri, 24 Jul 2015 16:07:52 +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 B8A0A75; Fri, 24 Jul 2015 09:08:03 -0700 (PDT) Received: from E107764 (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B3D813F510; Fri, 24 Jul 2015 09:07:50 -0700 (PDT) From: "Joey Ye" To: Cc: "Joey Ye" Subject: [patch] [testsuite, arm] Missing test case for thumb2 pop single Date: Fri, 24 Jul 2015 17:07:49 +0100 Message-ID: <000001d0c62a$e43885e0$aca991a0$@foss.arm.com> MIME-Version: 1.0 Find a missing test case for https://gcc.gnu.org/ml/gcc-patches/2015-01/msg00789.html left at the corner. Merged with the latest trunk. New test case does not fail on thumb1/thumb2/arm targets. ChangeLog: 2015-07-24: Joey Ye * gcc.target/arm/thumb2-pop-single.c: New test. diff --git a/gcc/testsuite/gcc.target/arm/thumb2-pop-single.c b/gcc/testsuite/gcc.target/arm/thumb2-pop-single.c new file mode 100644 index 0000000..f86c633 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/thumb2-pop-single.c @@ -0,0 +1,14 @@ +/* Verify if thumb2 save/restore lr unnecessarily in case of tail call. */ +/* Verify if thumb2 generates pop to restore a single register. */ +/* { dg-do compile { target arm_thumb2 } } */ +/* { dg-options "-Os" } */ +/* { dg-final { scan-assembler-not "push.*lr" } } */ +/* { dg-final { scan-assembler "pop\[\\t \]+\{r\[4-7\]\}" } } */ +extern int +bar (int, int, int, int); + +int +foo (int a, int b, int c, int d) +{ + return bar (b, a, c, d); +}