From patchwork Fri Jan 5 03:43:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 185214 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6008581dyb; Thu, 4 Jan 2024 19:49:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLU3jLYxFxFb1N1a/j9/dkD/O2+n/W7ati44vwbxEam4/KOwzphixwapqj6EZiGJWzTMh/ X-Received: by 2002:ad4:5948:0:b0:680:a521:d86 with SMTP id eo8-20020ad45948000000b00680a5210d86mr2736026qvb.47.1704426580686; Thu, 04 Jan 2024 19:49:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704426580; cv=pass; d=google.com; s=arc-20160816; b=J127O22e6hig1e8sKGOVzDXU+hBVjAnnKx7ojadAIj8NZdsQKm0WwsFtKmdzWQ+rwJ tDC4YRwBT8j1hb7wnr+av8iNciebXdKEv7SPLvPs8FFIPzcK/vRuAGbmJGHybcUGL6rW h2gGrFzd5ZiC80Kob3BCVaBWkJBH5Aspnwp9uiu6k9AhwVy1rAtXG0uokozvyk0bS1tN EeEc5cVQVEwbS2kpywO/Gs8nTMz9Lcd4d9tBHC4DpwTzPSr+1K9YMbzCI4w0b+7Gg0y0 gWSfy+GGwoKNlIwN77VYnBZAjfuUz40oz2BmoZaKiqXvQCOgIRWwKL5kfH6LSdRqx4Y6 nUQA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:arc-filter:dmarc-filter:delivered-to; bh=r5gxeODRIeQLNnqzOGFIzoFNSyirSWFrl0GjQ9xEH4U=; fh=FZUwle8+72fCZy+/zioADwckSVaPYtJTkTncWlIM74g=; b=pYVfKNVoUHw3UtYrom+kyvfTmmwv+dq75qIzKSb2COBSv+nRrBxtCv3mrfhSwsLM6e RoDKtQhB7tdRzEIlkrTKB1f29OVv8g2QDYJxeDxkCdKB/DU8T/LP48bNBeRRUVBQF/aN MEAvzfgGW/Fuq/uftMUS+pz63tNgPl/DvjjHIerRsv23ywvPkVSVzDouBRLUa0H6zyiX QE8uec/94GIX+/YAQ99iPJxO7Pz90ZbZc1DXEe0rBBbwUL99GpKL600ccmzoY5hlMYi6 /HcHGn1WFZuZgf+q+ldDYwiDTl9O3ZXtr5y1QdZg3Eq5WIcCtH/QDRZxhMBc2t0Rn6bN T6bw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id s25-20020a0cb319000000b00680c838d0fdsi1002363qve.169.2024.01.04.19.49.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 19:49:40 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 65D423857C64 for ; Fri, 5 Jan 2024 03:49:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 29A5D3857C5C for ; Fri, 5 Jan 2024 03:44:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29A5D3857C5C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 29A5D3857C5C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704426274; cv=none; b=ZbYeM3w1rrBGOob2FWLw7ufV/lxCSIifE413b1wloVc/K8K8IpfDXjeGnHxcQt3ozoal+jeinoGMZX6Md+IqPTPJVroIWrWJEf70uMtfpXZFTWjmmwE8xXEs2S+S8QC6cVjAHJaFIZ4T+9W414LEFk8jRXubKtbyYqO0amGH9js= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704426274; c=relaxed/simple; bh=NYKeGmUhZn+zUUTWTF7EiMLcxuCVaGhPiBy+/ZOWzFQ=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=IFtYcWTabU/G9YNGgKWAjblXVI6AJHvWSFBmiEmh3Lgt2wj4PXluW674rQE4hjeHJHOAZ6/OinuvA6QJv1Gl5eb8U0Wa+02o3zhTknWNHtl0ScVIkCup7lANdwx+pRnnf9GdEdLMnlDCIAM541vUrOkYFLLJGQwh3WSTSQ/Zk3I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLb8H-0003PN-Tc for gcc-patches@gcc.gnu.org; Thu, 04 Jan 2024 22:44:31 -0500 Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8Cxaeoae5dlYS0CAA--.3993S3; Fri, 05 Jan 2024 11:44:26 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bxut3vepdlO8oCAA--.7318S10; Fri, 05 Jan 2024 11:44:25 +0800 (CST) From: chenxiaolong To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn, chenxiaolong Subject: [PATCH v2 6/7] LoongArch: testsuite:Added additional vectorization "-mlasx" compilation option. Date: Fri, 5 Jan 2024 11:43:28 +0800 Message-Id: <20240105034329.21117-7-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240105034329.21117-1-chenxiaolong@loongson.cn> References: <20240105034329.21117-1-chenxiaolong@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Bxut3vepdlO8oCAA--.7318S10 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQAHBWWXVSgE1wAAsf X-Coremail-Antispam: 1Uk129KBj93XoWxKrW8Aw4fuw4fJw48Gw1xZwc_yoW3Xr1Dpa nxCrySkr1rWF1DurnruFZ3Z3Z3G3ZrWrZ09ryfKw4IkFy3KrnFvw18trW7JF13AFWF9r1f Zw48ur1ru3WYvwbCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkFb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jw0_WrylYx0Ex4A2jsIE 14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVW8JVW5JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF 04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07j8CztUUUUU= Received-SPF: pass client-ip=114.242.206.163; envelope-from=chenxiaolong@loongson.cn; helo=mail.loongson.cn X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_FAIL, SPF_HELO_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787220806156312268 X-GMAIL-MSGID: 1787220806156312268 In the LoongArch architecture, the reason for not adding the 128-bit vector-width-*hi* instruction template in the GCC back end is that it causes program performance loss, so we can only add the "-mlasx" compilation option to use 256-bit vectorization functions in test files. gcc/testsuite/ChangeLog: * gcc.dg/vect/bb-slp-pattern-1.c: If you are testing on the LoongArch architecture, you need to add the "-mlasx" compilation option to generate vectorized code. * gcc.dg/vect/slp-widen-mult-half.c: Dito. * gcc.dg/vect/vect-widen-mult-const-s16.c: Dito. * gcc.dg/vect/vect-widen-mult-const-u16.c: Dito. * gcc.dg/vect/vect-widen-mult-half-u8.c: Dito. * gcc.dg/vect/vect-widen-mult-half.c: Dito. * gcc.dg/vect/vect-widen-mult-u16.c: Dito. * gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: Dito. * gcc.dg/vect/vect-widen-mult-u8-u32.c: Dito. * gcc.dg/vect/vect-widen-mult-u8.c: Dito. --- gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c | 1 + gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c | 1 + gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c | 1 + gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c | 1 + gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c | 1 + gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c | 1 + gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c | 1 + gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c | 1 + gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-u32.c | 1 + gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8.c | 1 + 10 files changed, 10 insertions(+) diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c index a3ff0f5b3da..5ae99225273 100644 --- a/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-* } } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c index 72811eb852e..b69ade33886 100644 --- a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c +++ b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c @@ -1,6 +1,7 @@ /* Disabling epilogues until we find a better way to deal with scans. */ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-* } } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c index dfbb2171c00..53c9b84ca01 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c @@ -2,6 +2,7 @@ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ /* { dg-additional-options "-fno-ipa-icf" } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c index c2ad58f69e7..e9db8285b66 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c @@ -2,6 +2,7 @@ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ /* { dg-additional-options "-fno-ipa-icf" } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c index bfdcbaa09fb..607f3178f90 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c @@ -2,6 +2,7 @@ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ /* { dg-additional-options "-fno-ipa-icf" } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c index e46b0cc3135..cd13d826937 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c @@ -1,6 +1,7 @@ /* Disabling epilogues until we find a better way to deal with scans. */ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */ #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c index 14411ef43ed..258d253f401 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c @@ -1,6 +1,7 @@ /* Disabling epilogues until we find a better way to deal with scans. */ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c index f40def5dddf..3baafca7b54 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c @@ -1,6 +1,7 @@ /* Disabling epilogues until we find a better way to deal with scans. */ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-u32.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-u32.c index 63866390835..bcfbe198a3f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-u32.c +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-u32.c @@ -1,5 +1,6 @@ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-* } } */ #include #include "tree-vect.h" diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8.c index 78ad74b5d49..e3bf13b14fa 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8.c +++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8.c @@ -1,5 +1,6 @@ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */ /* { dg-require-effective-target vect_int } */ +/* { dg-additional-options "-mlasx" { target loongarch*-*-*} } */ #include #include "tree-vect.h"