From patchwork Thu Nov 21 12:05:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1198913 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-514296-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="FM+aU4ZR"; 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 47JdYC6dDBz9sPT for ; Thu, 21 Nov 2019 23:05:18 +1100 (AEDT) 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:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=n7l5mXKUQLJVxnIH8BXjQvoiYnLZV4y9zqrMl/OfjWsJMKoVO1LQE lEjUnYJb5tBWuQfEvdRvxu9DtBmpaW/QNd7KkpSO9sNgOODn+dhDjEW191YZC+b7 GtI4+RdqBUyEfusSoqYCGe1d/WEj6ai7Zh/wKs0lvvCbbJUCRth2E0= 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:subject:date:message-id:mime-version:content-type; s= default; bh=YrhTsDNsDknQcZ2jEuit/z4rNKM=; b=FM+aU4ZRLPXPjGpNhMwU VdKH+XWh2ABd7EPw+Zxoyt1FD3OtutRJJKT+pDH2/9NXn1ABZx3bXA7HW27nuKZ5 cY5R25c8ZZH8J3oiqHEszVL27tCrQyOABH//6fAGHyOhTuHKUkDFgz+xc7wkZl98 kHTjeKy8KVBqCXsbougo1UE= Received: (qmail 30905 invoked by alias); 21 Nov 2019 12:05:11 -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 30896 invoked by uid 89); 21 Nov 2019 12:05:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=UD:whilerw_1.c, whilerw_1.c, whilerw_1c, twhilerw X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Nov 2019 12:05:09 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AB519328 for ; Thu, 21 Nov 2019 04:05:07 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5381D3F703 for ; Thu, 21 Nov 2019 04:05:07 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [committed][AArch64] Add -fno-vect-cost-model to sve2/whilerw_1.c Date: Thu, 21 Nov 2019 12:05:06 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Bumping the cost of vec_to_scalar made the .s loop in gcc.target/aarch64/sve2/whilerw_1.c use a runtime profitability check, like the .d version already did. Since the cost model isn't really being tested here, the most robust fix seemed to be to disable it, which I should really have done from the outset. Tested on aarch64-linux-gnu and applied as r278549. Richard 2019-11-21 Richard Sandiford gcc/testsuite/ * gcc.target/aarch64/sve2/whilerw_1.c: Add -fno-vect-cost-model. Require x0 in the .d test too. Index: gcc/testsuite/gcc.target/aarch64/sve2/whilerw_1.c =================================================================== --- gcc/testsuite/gcc.target/aarch64/sve2/whilerw_1.c 2019-11-18 15:36:04.869884903 +0000 +++ gcc/testsuite/gcc.target/aarch64/sve2/whilerw_1.c 2019-11-21 12:02:54.170171205 +0000 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -ftree-vectorize" } */ +/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */ /* { dg-require-effective-target lp64 } */ #include @@ -26,5 +26,5 @@ TEST_LOOP (int64_t); /* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.b, x0, x1\n} 1 } } */ /* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.h, x0, x1\n} 1 } } */ /* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.s, x0, x1\n} 1 } } */ -/* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.d, x[0-9]+, x1\n} 1 } } */ +/* { dg-final { scan-assembler-times {\twhilerw\tp[0-9]+\.d, x0, x1\n} 1 } } */ /* { dg-final { scan-assembler-not {\twhilewr\t} } } */