From patchwork Wed Sep 26 16:21:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 975253 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-486476-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cavium.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="cRpD9dzK"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=CAVIUMNETWORKS.onmicrosoft.com header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b="dU7q1zAE"; dkim-atps=neutral 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 42L39X3FSpz9s2P for ; Thu, 27 Sep 2018 02:21:52 +1000 (AEST) 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:content-type:content-id :content-transfer-encoding:mime-version:reply-to; q=dns; s= default; b=mtkKiIuLXl85iBF6D60xTkCYRmVZZ1KgrmjqCCbxB13RUoXE+vcpb yjZlnKCJ6z2gnVAzsacbsnpxsuq0eApTQr3SODLu+zFkuHx8fXUvD3RYXrDNfGSM wTy2il3EZRNCnPu45tF7RWf44al9XxRNh2HyGRpAHSN5GNu2vvqfdA= 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:content-type:content-id :content-transfer-encoding:mime-version:reply-to; s=default; bh= IYPPlnVnL+zJEZv7XWpAdyLRZr0=; b=cRpD9dzKGcsnuo4WPJOmrfwOhlrA9UwZ 5WkryrqFeMxtcRU0BVHfETASEWDzzIB4U+GZVCjeB27GIlKj1jv64TbDUeb8khR5 RQCBeI/i995sslHiqym4FyJgHrFeEelC797cVQehcTNId2BBW2P0Gui9G/rwhtY/ wk891beJYhE= Received: (qmail 108869 invoked by alias); 26 Sep 2018 16:21:45 -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 108860 invoked by uid 89); 26 Sep 2018 16:21:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, MIME_BASE64_BLANKS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=757 X-HELO: NAM01-BN3-obe.outbound.protection.outlook.com Received: from mail-bn3nam01on0078.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) (104.47.33.78) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Sep 2018 16:21:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BtquprPWZ0k/BSZ2l91vAlRtNyIPgmMHT2cchyaoWFM=; b=dU7q1zAE+M8E7wedWhDECb3e67PT2YPFFJ5LXZE0iDmfnpmCXAOaWPVfSmJMNRTJNifCQXPeVfUIrEoftXinNKFuxopXJLQI7an4QpgYrOYNwfOeC+zjGdF45CS293jzXPOrrLt7DChY585Ksxlfs8DM+/oVBI9IJBrvBeBSeOo= Received: from BYAPR07MB5031.namprd07.prod.outlook.com (52.135.238.224) by BYAPR07MB4245.namprd07.prod.outlook.com (52.135.222.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.25; Wed, 26 Sep 2018 16:21:39 +0000 Received: from BYAPR07MB5031.namprd07.prod.outlook.com ([fe80::3885:f2b5:7f36:9e86]) by BYAPR07MB5031.namprd07.prod.outlook.com ([fe80::3885:f2b5:7f36:9e86%4]) with mapi id 15.20.1143.022; Wed, 26 Sep 2018 16:21:39 +0000 From: Steve Ellcey To: gcc-patches CC: "msebor@redhat.com" Subject: [Patch, Aarch64] Fix testsuite regressions related to PR tree-optimization/71625 Date: Wed, 26 Sep 2018 16:21:39 +0000 Message-ID: <1537978896.18948.24.camel@cavium.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve.Ellcey@cavium.com; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Content-ID: <61079D1245A4E54388E4E388F19F4621@namprd07.prod.outlook.com> MIME-Version: 1.0 Reply-To: A patch for PR tree-optimized/71625 caused regressions in the gcc.target/aarch64/vclz.c and gcc.target/aarch64/vneg_s.c tests because a couple of routines that were not getting inlined before started getting inlined.  The inlining is not a bug, the  generated code is now smaller so some functions that were previously not being inlined due to being too large are now getting inlined. Because we also generate out-of-line code the scan-assembler-times checks are failing.  Since inlining or not inlining is not the  point of this test I added the noinline attribute to all the test_* functions and this fixed the test regressions. Tested on aarch64, OK for checkin? Steve Ellcey sellcey@cavium.com 2018-09-26  Steve Ellcey   PR tree-optimization/71625 * /gcc.target/aarch64/vclz.c (test_vclz_s8): Add noinline attribute. (test_vclz_s16): Ditto. (test_vclz_s32): Ditto. (test_vclzq_s8): Ditto. (test_vclzq_s16): Ditto. (test_vclzq_s32): Ditto. (test_vclz_u8): Ditto. (test_vclz_u16): Ditto. (test_vclz_u32): Ditto. (test_vclzq_u8): Ditto. (test_vclzq_u16): Ditto. (test_vclzq_u32): Ditto. * gcc.target/aarch64/vneg_s.c (test_vneg_s8): Ditto. (test_vneg_s16): Ditto. (test_vneg_s32): Ditto. (test_vneg_s64): Ditto. (test_vnegd_s64): Ditto. (test_vnegq_s8): Ditto. (test_vnegq_s16): Ditto. (test_vnegq_s32): Ditto. (test_vnegq_s64): Ditto. diff --git a/gcc/testsuite/gcc.target/aarch64/vclz.c b/gcc/testsuite/gcc.target/aarch64/vclz.c index 60494a8..a36ee44 100644 --- a/gcc/testsuite/gcc.target/aarch64/vclz.c +++ b/gcc/testsuite/gcc.target/aarch64/vclz.c @@ -75,7 +75,7 @@ extern void abort (void);      if (a [i] != b [i]) \        return 1;   -int +int __attribute__ ((noinline))  test_vclz_s8 ()  {    int i; @@ -107,7 +107,7 @@ test_vclz_s8 ()  /* Double scan-assembler-times to take account of unsigned functions.  */  /* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b" 4 } } */   -int +int __attribute__ ((noinline))  test_vclz_s16 ()  {    int i; @@ -138,7 +138,7 @@ test_vclz_s16 ()  /* Double scan-assembler-times to take account of unsigned functions.  */  /* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.4h, v\[0-9\]+\.4h" 10} } */   -int +int __attribute__ ((noinline))  test_vclz_s32 ()  {    int i; @@ -205,7 +205,7 @@ test_vclz_s32 ()  /* Double scan-assembler-times to take account of unsigned functions.  */  /* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" 34 } } */   -int +int __attribute__ ((noinline))  test_vclzq_s8 ()  {    int i; @@ -226,7 +226,7 @@ test_vclzq_s8 ()  /* Double scan-assembler-times to take account of unsigned functions.  */  /* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 2 } } */   -int +int __attribute__ ((noinline))  test_vclzq_s16 ()  {    int i; @@ -262,7 +262,7 @@ test_vclzq_s16 ()  /* Double scan-assembler-times to take account of unsigned functions.  */  /* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h" 6 } } */   -int +int __attribute__ ((noinline))  test_vclzq_s32 ()  {    int i; @@ -303,7 +303,7 @@ test_vclzq_s32 ()    /* Unsigned versions.  */   -int +int __attribute__ ((noinline))  test_vclz_u8 ()  {    int i; @@ -331,7 +331,7 @@ test_vclz_u8 ()    /* ASM scan near test for signed version.  */   -int +int __attribute__ ((noinline))  test_vclz_u16 ()  {    int i; @@ -361,7 +361,7 @@ test_vclz_u16 ()    /* ASM scan near test for signed version.  */   -int +int __attribute__ ((noinline))  test_vclz_u32 ()  {    int i; @@ -427,7 +427,7 @@ test_vclz_u32 ()    /* ASM scan near test for signed version.  */   -int +int __attribute__ ((noinline))  test_vclzq_u8 ()  {    int i; @@ -448,7 +448,7 @@ test_vclzq_u8 ()    /* ASM scan near test for signed version.  */   -int +int __attribute__ ((noinline))  test_vclzq_u16 ()  {    int i; @@ -485,7 +485,7 @@ test_vclzq_u16 ()    /* ASM scan near test for signed version.  */   -int +int __attribute__ ((noinline))  test_vclzq_u32 ()  {    int i; diff --git a/gcc/testsuite/gcc.target/aarch64/vneg_s.c b/gcc/testsuite/gcc.target/aarch64/vneg_s.c index e7f20f2..6947526 100644 --- a/gcc/testsuite/gcc.target/aarch64/vneg_s.c +++ b/gcc/testsuite/gcc.target/aarch64/vneg_s.c @@ -87,7 +87,7 @@ extern void abort (void);      force_simd (res);                                 \    }   -int +int __attribute__ ((noinline))  test_vneg_s8 ()  {    int8x8_t a; @@ -107,7 +107,7 @@ test_vneg_s8 ()    /* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b" 1 } } */   -int +int __attribute__ ((noinline))  test_vneg_s16 ()  {    int16x4_t a; @@ -127,7 +127,7 @@ test_vneg_s16 ()    /* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.4h, v\[0-9\]+\.4h" 2 } } */   -int +int __attribute__ ((noinline))  test_vneg_s32 ()  {    int32x2_t a; @@ -153,7 +153,7 @@ test_vneg_s32 ()    /* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" 4 } } */   -int +int __attribute__ ((noinline))  test_vneg_s64 ()  {    int64x1_t a; @@ -189,7 +189,7 @@ test_vneg_s64 ()    return 0;  }   -int +int __attribute__ ((noinline))  test_vnegd_s64 ()  {    int64_t a, b; @@ -208,7 +208,7 @@ test_vnegd_s64 ()    /* { dg-final { scan-assembler-times "neg\\td\[0-9\]+, d\[0-9\]+" 16 } } */   -int +int __attribute__ ((noinline))  test_vnegq_s8 ()  {    int8x16_t a; @@ -231,7 +231,7 @@ test_vnegq_s8 ()    /* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 1 } } */   -int +int __attribute__ ((noinline))  test_vnegq_s16 ()  {    int16x8_t a; @@ -251,7 +251,7 @@ test_vnegq_s16 ()    /* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h" 1 } } */   -int +int __attribute__ ((noinline))  test_vnegq_s32 ()  {    int32x4_t a; @@ -271,7 +271,7 @@ test_vnegq_s32 ()    /* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" 2 } } */   -int +int __attribute__ ((noinline))  test_vnegq_s64 ()  {    int64x2_t a;