From patchwork Sat Jan 13 07:28:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 187874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp640282dyc; Fri, 12 Jan 2024 23:29:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgpttGh4YP3FePwiN9ClmdZ4gcCLjhjy/ap+CNwUVidiBLEScYtjgk6C+c2xaL4ekMKMMs X-Received: by 2002:a05:620a:3890:b0:783:3e7c:488b with SMTP id qp16-20020a05620a389000b007833e7c488bmr2842033qkn.117.1705130952011; Fri, 12 Jan 2024 23:29:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705130951; cv=pass; d=google.com; s=arc-20160816; b=O7EaADmHTpg1j5vKynpzbSNofEdSCjIZD5j0LMR13ldrDHz9fM+EB/hRQ1J2WnbgqC s3jDPfwLJ/1u68tvzCoZu9ogj3liGQACcDGU9jscvLRI9InEnAg/2NIZ2HRJcEegQ4Fb hWYGgZ6nRbTq50m5b/L9cPyfwsOMzDe+DOnS44iN+Yqfb5FiTtgSTmUbIrQ3SbzP0S8i qayFi1NhcvK5fB1wZAC0S+nsUMjKl8stDIZa0Raw3/935B54LnxLoIvq6IADfCNxJvJh t3g3LJKMUE8OHlCPQM3NIPRekl6wBPBXXmZcYcI/37MYHDEE4/XjD79+Rfdm5k3y2K/a ga5w== 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=FQTkcefi84an+Nhs+nSVK9oakQehFcsUWmJFGdldYPw=; fh=6LgICDG6zE7j/CxCHu23CB0rJd/K2ImLz1UJ2l2oyZE=; b=Cr9j4Q63IeYjp4XVCg0OHLZwtgdkqqO47hkFZ3EuDJx2apSMty7njwvbHFNw5NADr1 Q8bketxntGLGV06a1A7AB9+VgwWhXIZ1EGfujySNTkEwJHk6kahGWP4wMlP7G+6WKzE/ poy9ZrmetSZr8nL21M+OOD6RTtpWRT3Cn9+wVknC+4on5ARSj3eV6nj4uNzWCZfIEN2q 7pYaZQK0vCq+jxb0qjEekobybQj/Zp7JlFiH6EEDEwH+h4pLOdBIaxI0bAYyr6df51b8 TPHVkYQNrGypnX3dyJD1tGQkR/f+ypKucAzOjDodiDozT2E6Y/zwpgL8J2JKd4Cd/Luw EJJQ== 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 5-20020a05620a04c500b0078329ed2894si4388228qks.525.2024.01.12.23.29.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 23:29:11 -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 A9F3E3858C78 for ; Sat, 13 Jan 2024 07:29:11 +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 17C543858D28 for ; Sat, 13 Jan 2024 07:28:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 17C543858D28 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 17C543858D28 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=1705130913; cv=none; b=XWXivWxJKrOtcfKJmpKDqHVcxbPM4/9fmNJflPBZBTNYRJSsJgJUygY7Dv50ZIs5ACRD7pS3CwRPhWyCJWFq8WHKKNGJk2YDbCe08m1kd+z/PbAszfQ9wr1PJjyhTQ2NcA6HsfBZF2W8enRLixYcdfiNY/fTyJQwsaEqrIVQCUc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705130913; c=relaxed/simple; bh=ajsmUEJQfp4UPZmv+TlMBlkE8W6D1xB9UOmkQMmkHCU=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=Ympd2FGJtg260W/UCCo2hGwMlOX7UiLtn9EtHmMXDjCStxES2NuJR87qxOPISBSEVHt9Jjt/vQPpNh+bLLvhqIL3t9nUDpwn/Vn6WSpjzFwbuHhpjPPRNSpf6LbolliIEAAf3cVAOS/Tc0DOP6zwPzf/oC8MkEhk3x3rqPgoCLg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8AxjOibO6JlzsEEAA--.5485S3; Sat, 13 Jan 2024 15:28:28 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx+92bO6JlNs8XAA--.62074S4; Sat, 13 Jan 2024 15:28:27 +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, ci_notify@linaro.org, chenxiaolong Subject: [PATCH v2] LoongArch: testsuite:Added additional vectorization "-mlsx" option. Date: Sat, 13 Jan 2024 15:28:17 +0800 Message-Id: <20240113072817.31932-1-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Bx+92bO6JlNs8XAA--.62074S4 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQAOBWWgj6kIGwALsx X-Coremail-Antispam: 1Uk129KBj93XoWxCr1UJry3CF15XrWfuw47WrX_yoWrJryrpw nxZryxKw18GF1kGr17WrWIyF4rWan2gFZ8uFWxKw4Iv3WxJryIq3W8KFW3J3W3XF43Xr1f Xw4ku345Za1avwcCm3ZEXasCq-sJn29KB7ZKAUJUUUUr529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUvEb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Gr0_Gr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYI kI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUXVWU AwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI4 8JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v26r1Y 6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7 AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE 2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcV C2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73 UjIFyTuYvjxU2MKZDUUUU 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: 1787959393290919811 X-GMAIL-MSGID: 1787959393290919811 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..06cfbbcfae5 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..6f2ad1166a4 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