From patchwork Fri Jan 12 01:52:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 187542 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1846430dyi; Thu, 11 Jan 2024 17:53:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IERCqVd/lZlw8l/q48fjFKcrI80mL3pgCwdgZ68AJ//67z/SkUlAJIN+I+ctBNytXVzmAMq X-Received: by 2002:a05:622a:8d:b0:429:857b:e3cc with SMTP id o13-20020a05622a008d00b00429857be3ccmr670238qtw.126.1705024402014; Thu, 11 Jan 2024 17:53:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705024401; cv=pass; d=google.com; s=arc-20160816; b=jz99BGT/PrfOqmV4OqsnIGed78WhDqpDpO+/EV5O1lEmVCpJtgagBcnzpUbwOyAIzi fD8KjBghit2WZTpbyQLQe8KrMZ661Ph76ZxVQXAccFjHIw5z6qLS4IBEmyAhYIMS9NHW pc6XFLoHa5QS3KmRDWIljGCd6hHl1jZ+rwkFZ04f4SWpMddOAaE5boCvf8eLalkC0hQS m+VtdTdJuyP58SOW8nbrfbOfLxbCMxcK2JIs+WlDVROP8S5xh/cpUGYl3BSYswidBz5H XSuwoLOnEMOvXM2dR91ikXB5o0CDFqLM8NcSvdRtl0o9EB25BSkm7nqv88k1yL52PYS0 T/ag== 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:message-id:date:subject:cc:to:from:arc-filter :dmarc-filter:delivered-to; bh=EVo3qxOuOXlfkh3XPbSkiMkrk90BQZw1ekOmcs2KU9c=; fh=sDQpqXmoyAD4aJEKS8atWABejFDeQW4qI6gmNZNBTYc=; b=ODXBnMrmXHSVcF96j2edo9Xchg5dOUrw5cb5V/geNhcc5F//9oFC9l2DvYV97U+9ZI KlV6y4tMaJgqyM/BSTqg7b2nWBgmtWKj9rfP3XzKLowkRieMDUsysbiCE16bEUvCT5GA djl2esK1FdXi3/YJSMaH9ztVkd4wfDIP4rCf7xWAz3421rqUJfmRdQtjaCVjwmeCwc7i EY5+9O7G4aJ110uRwtkg6QDY4AIrjfvogT4FKvLg4aODJbfS0piRcVvOuiEH4m+IYIDv mBqbpAgpmnY+hrLrM4wdQcp2FMc11QUuXzfrMX5a9lnHbjjtNcOgOauVyELDAIuIrBy/ oblg== 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 t14-20020a05622a148e00b00428204215cdsi2204742qtx.74.2024.01.11.17.53.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 17:53:21 -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 B0A8C385841B for ; Fri, 12 Jan 2024 01:53:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 1B6BF3858CD1 for ; Fri, 12 Jan 2024 01:52:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B6BF3858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1B6BF3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705024345; cv=none; b=Acq9dF/0DhRrmIqBwMTJ4F17AShTs7TYGTzoQW1ej9TNcOAO/1X2OgeIx3wlb6PIlpoiR+rZeH4WNWowdjA/cuOD09z+14bF/UVdIWU37gHLNZkheh0FsMMI2RYujRRkBkEPnMOQMhaTC/Y2djtDCDy8ZRrWFxiVkLVBwo+y2OM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705024345; c=relaxed/simple; bh=xIqVfrbLQIc8cd+5NYp4Ii5S+G5kX1tgcrv1ohk6tCg=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=QLo4JAX3ExEavQY6oNWyTB26EEpFFImb3YLbVXni1cZt7NDciKFph0jnRHDwOeMJ3ufRCfNU43I8iInxvS5o+n9ZI5wyfDNOUiGvZd4MuP6NL7Vggb/twMBej058JUwgrbG0s/TjjzFl1YR3zoFvuhp6lXVMrSloFPhioiareOo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8DxvrtPm6Bl92sEAA--.4757S3; Fri, 12 Jan 2024 09:52:15 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx799Om6Bla3USAA--.48292S4; Fri, 12 Jan 2024 09:52:14 +0800 (CST) From: chenxiaolong To: gcc-patches@gcc.gnu.org Cc: xry111@xry111.site, i@xen0n.name, xuchenghua@loongson.cn, chenglulu@loongson.cn, schwab@linux-m68k.org, chenxiaolong Subject: [PATCH v1] LoongArch: testsuite:Added additional vectorization "-mlsx" option. Date: Fri, 12 Jan 2024 09:52:05 +0800 Message-Id: <20240112015205.4402-1-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cx799Om6Bla3USAA--.48292S4 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQANBWWfPikETgASs8 X-Coremail-Antispam: 1Uk129KBj93XoWxCr1UJry3CF15XrWfuw47WrX_yoWrJr4kpw nxZryxKw18GF1kGr17WrWIyF4rWan2gFZ8uFyxKw4Ivw1xJryIq3WrKFW3JF13XF43Xr1f Xw4ku345Z3WavwcCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkjb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j0FALUUUUU= X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_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: 1787847667315400028 X-GMAIL-MSGID: 1787847667315400028 gcc/testsuite/ChangeLog: * gcc.dg/pr104992.c: Added additional "-mlsx" compilation options. * gcc.dg/signbit-2.c: Dito. * gcc.dg/tree-ssa/scev-16.c: Dito. * gfortran.dg/graphite/vect-pr40979.f90: Dito. * gfortran.dg/vect/fast-math-mgrid-resid.f: Dito. --- gcc/testsuite/gcc.dg/pr104992.c | 1 + gcc/testsuite/gcc.dg/signbit-2.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/scev-16.c | 1 + gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 | 1 + gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f | 1 + 5 files changed, 5 insertions(+) diff --git a/gcc/testsuite/gcc.dg/pr104992.c b/gcc/testsuite/gcc.dg/pr104992.c index 82f8c75559c..a77992fa491 100644 --- a/gcc/testsuite/gcc.dg/pr104992.c +++ b/gcc/testsuite/gcc.dg/pr104992.c @@ -1,6 +1,7 @@ /* PR tree-optimization/104992 */ /* { dg-do compile } */ /* { dg-options "-O2 -Wno-psabi -fdump-tree-optimized" } */ +/* { dg-additional-options "-mlsx" { target loongarch_sx } } */ #define vector __attribute__((vector_size(4*sizeof(int)))) diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c index 62bb4047d74..5511bb78149 100644 --- a/gcc/testsuite/gcc.dg/signbit-2.c +++ b/gcc/testsuite/gcc.dg/signbit-2.c @@ -5,6 +5,7 @@ /* { dg-additional-options "-msse2 -mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */ /* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */ /* { dg-additional-options "-maltivec" { target powerpc_altivec_ok } } */ +/* { dg-additional-options "-mlsx" { target loongarch_sx } } */ /* { dg-skip-if "no fallback for MVE" { arm_mve } } */ #include diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-16.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-16.c index 120f40c0b6c..acaa1156419 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/scev-16.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-16.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target vect_int } */ /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */ +/* { dg-additional-options "-mlsx" { target loongarch*-*-* } } */ int A[1024 * 2]; diff --git a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 index a42290948c4..4c251aacbe3 100644 --- a/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 +++ b/gcc/testsuite/gfortran.dg/graphite/vect-pr40979.f90 @@ -1,6 +1,7 @@ ! { dg-do compile } ! { dg-require-effective-target vect_double } ! { dg-additional-options "-msse2" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } +! { dg-additional-options "-mlsx" { target loongarch*-*-* } } module mqc_m integer, parameter, private :: longreal = selected_real_kind(15,90) diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f index 08965cc5e20..97b88821731 100644 --- a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f +++ b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f @@ -2,6 +2,7 @@ ! { dg-require-effective-target vect_double } ! { dg-options "-O3 --param vect-max-peeling-for-alignment=0 -fpredictive-commoning -fdump-tree-pcom-details -std=legacy" } ! { dg-additional-options "-mprefer-avx128" { target { i?86-*-* x86_64-*-* } } } +! { dg-additional-options "-mlsx" { target { loongarch*-*-* } } } ! { dg-additional-options "-mzarch" { target { s390*-*-* } } } ******* RESID COMPUTES THE RESIDUAL: R = V - AU