From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 04C293858D35 for ; Mon, 22 Apr 2024 09:28:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 04C293858D35 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 04C293858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::430 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713778138; cv=none; b=jyovWsdnEdDKTix3TxGDzdBz+Waa+B9GBazk1yXxp03seBLNfSPNwUKyywjfhC65CXVk1HNHfk3BK+GVTlwFR6eBnffWECQvmbPjPy+b330NWw4kgSGTttyw2tcMsPoyRCGJhB294slWxpzQSZhcMYXkzjjevTz7UntyOM8U+k8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713778138; c=relaxed/simple; bh=9bZfqpBIjT+MdsaxyvC1hUijn1K5utMl17kxnCm4uFM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=fXJDF9P3r7W/qkfQMBCw7un1D+UoXn/U3lHciFwewOcU/wMl/j0U7Jssi92T92SYsCxgHfVrYHK1VVQmz52YSYhIcIBo4mSMnmobwiKiTsY7RrOjE3vZDsSRXJdZI9wxFPS8po1i7KG328xwnG8lNWAvWYZ66F+QeQcYayAWyrs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6ed627829e6so4654710b3a.1 for ; Mon, 22 Apr 2024 02:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1713778135; x=1714382935; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OY4uv1O/KMmZaNNXHvdivmuur3X+1IDNUA++J1epL2c=; b=LIR8AJ5F8nfz+sHxWEzCJdHXQd3Ssxa49TWEHgeFz/qh0SS2UU+3rozlsXq/KzfrUh etDNDN8FQoN/Fu5PaXJPD2NBUauZBTLDYW9IZ3+phMa6/p4XS02Hr7i0023a4U79vV7A gi4h2hSj+e6J/A4mVRSSApZubGv2Q5Y6s4f+/L6dGxPItbfXlREUVjeNUOHSmnlCfkrx WQjDaWFV3Lj6qjylH2rgcWY4N1kIMay6dMe4TuVCWJjBLqtGtzwTr4+zjqC450tl1vxZ tjqBueNdbdI9GH4ux068tLXLTqmR+VJPeLE7wcnXmEF/etfAKa/bvXDdOAiSkQsiqB7R n4cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713778135; x=1714382935; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OY4uv1O/KMmZaNNXHvdivmuur3X+1IDNUA++J1epL2c=; b=cGonMtt8LT+20uITME8Kg6/IjxxFeQOOnFNFtaWyKnpp2uIgimQC8affzTjAJs8Q9i oFG9vh50RSj0+ahzJyje3XoKR+1D1UkffZqQcpuk0q0SZbQicAuYTdGN3H1t7n/Xymza Z2/yAm2MwxjEVi6W2Y0+HVUMMLGDeKNSyxk3GWB80AKSqsLsAXKoK/cpV4QwSuD2YfV4 kWOd04nbS+x6lE7CpP2Ej1cFc6WsVmwF9EtOlqC7ZNyU6AH79cvFcQaMFYnSj9qhdq8V wZ4rbRaapnzCnYS7PmNoW1i2UOz9ee1ZGspLnEgD49HyFCFxu4L+5ZyL12YqngoQBkbZ tyxw== X-Gm-Message-State: AOJu0YwzG9kjYyUCqgxo3xnUh6FPbWvxJk+JC1YJfM+Yn6NtQo/mVq6+ 5WvzF+K0izogJNbWW2GwI16IYGtWyrkWvX9ivH5jlsCoMtEguZnqKKj29LwF2CskwVQ+DQTXBOb zuw== X-Google-Smtp-Source: AGHT+IFF/jrwFH2a+7xQYII2B4EFe9vM/0FNTYHXsPk5JLw7PmbnyQDxQQyD9yrCoLeQwHm+vJldWA== X-Received: by 2002:a05:6a21:350d:b0:1a9:5eb1:7f35 with SMTP id zc13-20020a056a21350d00b001a95eb17f35mr13176056pzb.46.1713778134888; Mon, 22 Apr 2024 02:28:54 -0700 (PDT) Received: from free.home ([2804:7f1:218b:5e2:c43b:e0c4:71a:241b]) by smtp.gmail.com with ESMTPSA id e6-20020a170902784600b001e2a3014541sm7819473pln.190.2024.04.22.02.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 02:28:54 -0700 (PDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 43M9SY7L019629 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 06:28:35 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Cc: Rainer Orth , Mike Stump , David Edelsohn , Segher Boessenkool , Kewen Lin Subject: [PATCH] adjust vectorization expectations for ppc costmodel 76b Organization: Free thinker, does not speak for AdaCore References: Date: Mon, 22 Apr 2024 06:28:34 -0300 In-Reply-To: (Alexandre Oliva's message of "Wed, 10 Mar 2021 06:12:38 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,WEIRD_QUOTING autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Ping? https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566525.html This test expects vectorization at power8+ because strict alignment is not required for vectors. For power7, vectorization is not to take place because it's not deemed profitable: 12 iterations would be required to make it so. But for power6 and below, the test's 10 iterations are enough to make vectorization profitable, but the test doesn't expect this. Assuming the decision is indeed appropriate, I'm adjusting the expectations. for gcc/testsuite/ChangeLog * gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Adjust expectations for cpus below power7. --- .../gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c index cbbfbb24658f8..0dab2c08acdb4 100644 --- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c +++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c @@ -46,9 +46,10 @@ int main (void) return 0; } -/* Peeling to align the store is used. Overhead of peeling is too high. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { vector_alignment_reachable && {! vect_no_align} } } } } */ -/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { vector_alignment_reachable && {! vect_hw_misalign} } } } } */ +/* Peeling to align the store is used. Overhead of peeling is too high + for power7, but acceptable for earlier architectures. */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { has_arch_pwr7 && { vector_alignment_reachable && {! vect_no_align} } } } } } */ +/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" { target { has_arch_pwr7 && { vector_alignment_reachable && {! vect_hw_misalign} } } } } } */ /* Versioning to align the store is used. Overhead of versioning is not too high. */ -/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align || {! vector_alignment_reachable} } } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align || { {! vector_alignment_reachable} || {! has_arch_pwr7 } } } } } } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer More tolerance and less prejudice are key for inclusion and diversity Excluding neuro-others for not behaving ""normal"" is *not* inclusive