From patchwork Fri Jan 27 10:30:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 720572 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 3v8w783bdpz9t8j for ; Fri, 27 Jan 2017 21:31:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="VSGyl5Gk"; 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:content-type:mime-version; q=dns; s=default; b=ZwnF2a4FA0yNKfSdffGvyjOEU1lNNbTVOaBt8buOMZK5CoQoD1 NImYU5jTcgU9wQW569eSLmcKtEqLCq5lt0Zx2uBSV5t4wvOBjMGGjAl5W4xyX3lX J2Ox6x0BmN4c/r8dlO+u2BVa8nKhjNj9Hn02RG9yZHjxAFaAiAsGuotP4= 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:mime-version; s= default; bh=3w5RrCJF86Hh3pBzQIFDNAPUiD8=; b=VSGyl5Gk5P24Kz0hBWmE 6ZbgnipMHVdV0hLPkunfN9c39Auic8HZ5NpneJT791AnGyDMNGolGM12PSbbGAW4 h+BAzVQqa66C9SVqavVZGnF6+uxAMrkAPY7iy3A7FXqZfiFL/A2Kw32rlAb880iz LGFmBQ+ISfw7oCEAGfa+O7A= Received: (qmail 87632 invoked by alias); 27 Jan 2017 10:31:07 -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 87621 invoked by uid 89); 27 Jan 2017 10:31:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=christina, Christina, Hx-spam-relays-external:15.01.0860.023, H*r:15.01.0860.023 X-HELO: EUR03-VE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr50062.outbound.protection.outlook.com (HELO EUR03-VE1-obe.outbound.protection.outlook.com) (40.107.5.62) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Jan 2017 10:30:56 +0000 Received: from VI1PR0801MB2031.eurprd08.prod.outlook.com (10.173.74.140) by VI1PR0801MB2095.eurprd08.prod.outlook.com (10.173.75.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Fri, 27 Jan 2017 10:30:52 +0000 Received: from VI1PR0801MB2031.eurprd08.prod.outlook.com ([10.173.74.140]) by VI1PR0801MB2031.eurprd08.prod.outlook.com ([10.173.74.140]) with mapi id 15.01.0860.023; Fri, 27 Jan 2017 10:30:52 +0000 From: Tamar Christina To: GCC Patches , James Greenhalgh , Richard Earnshaw , Marcus Shawcroft CC: nd Subject: [GCC][PATCH]{AArch64][Testsuite] Fix failing vector_initialization_nostack.c Date: Fri, 27 Jan 2017 10:30:52 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tamar.Christina@arm.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-office365-filtering-correlation-id: ad70363e-4456-4c85-ee30-08d4469f91c2 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:VI1PR0801MB2095; x-microsoft-exchange-diagnostics: 1; VI1PR0801MB2095; 7:NETASmwEvlDSRUEjn/dTuyFHQuiJ+TIBOCF86Jp1CVK4Ac8MIvjCFh0D9c1c5OhcM+t08rx/mPmSv0v99F95SYlAW/Pwa4dKL6u00bcR5JTXiCHfykJcCeXmUATJIF6qYTUGg+R4kQHICLFmpc3SZkmTxr8SpVnkH+t+pldHJTvOluN7jQfeeZ0Ha/KiYM3gvTBZuz0m6yOMIO0j0mgOYQu38EPCFVuYdDeA42HtdVJ8yTQLxBvJ6ObGf1ZkOsRefBQ/FWFgJPcCiyHwRD986rtX8+nbNqHgnfD+dym3pYh673orF9w9VGL8W9IcocEQ1C78gLXAUrWv3SfWjelMqbtgchkyiQy+18zry2Lu/P+oKweZwsqePbrALibHvT24z0Ogag5aTh4+3vx8ADURF+LJdn6vxovRrLSwtU0nKaknh27/xIV72wg1lFjld2ry2FLL+OXW+QphrLaqqjLntg== nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(102415395)(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(6072148); SRVR:VI1PR0801MB2095; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0801MB2095; x-forefront-prvs: 0200DDA8BE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39860400002)(39450400003)(39840400002)(39410400002)(39850400002)(189002)(53754006)(377424004)(199003)(6506006)(105586002)(5660300001)(53936002)(122556002)(7696004)(8936002)(33656002)(6636002)(9686003)(3660700001)(99286003)(25786008)(38730400001)(81156014)(6436002)(77096006)(74316002)(305945005)(8676002)(7736002)(81166006)(2900100001)(92566002)(55016002)(2906002)(4326007)(50986999)(54356999)(102836003)(3846002)(6116002)(99936001)(189998001)(66066001)(106116001)(106356001)(68736007)(86362001)(450100001)(5001770100001)(97736004)(101416001)(3280700002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB2095; H:VI1PR0801MB2031.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2017 10:30:52.3106 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB2095 X-IsSubscribed: yes Hi all, This fixes (PR78142) by only creating one vector in the char case. r241590 is causing more registers to be used and so the SP registered happens to be picked and used. This test I believe was checking explicitly that the SP is not used if not needed. By creating a single vector then less registers are needed so SP won't be used. Ran regression tests on aarch64-none-linux-gnu. Ok for trunk? Thanks, Tamar gcc/testsuite/ 2017-01-26 Tamar Christina PR middle-end/78142 * gcc.target/aarch64/vector_initialization_nostack.c (f12): Use one vector. diff --git a/gcc/testsuite/gcc.target/aarch64/vector_initialization_nostack.c b/gcc/testsuite/gcc.target/aarch64/vector_initialization_nostack.c index bbad04d00263b6a91b826b4911af92bdd226c821..bf43f1cd72ec4e636dbd45534c9ab348bee8febc 100644 --- a/gcc/testsuite/gcc.target/aarch64/vector_initialization_nostack.c +++ b/gcc/testsuite/gcc.target/aarch64/vector_initialization_nostack.c @@ -38,14 +38,14 @@ f11 (void) return sum; } -char arr_c[100][100]; +char arr_c[100]; char f12 (void) { int i; char sum = 0; for (i = 0; i < 100; i++) - sum += arr_c[i][0] * arr_c[0][i]; + sum += arr_c[i] * arr_c[i]; return sum; }