From patchwork Sat Jan 13 07:28:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 187875 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp640506dyc; Fri, 12 Jan 2024 23:30:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqkq1l1FO1kY2dK+L2ZJoLE4sxLbZiW4apUN31uvCrQT7j5RcaReZqHjpWz8kqN57kgc4S X-Received: by 2002:ac8:58cc:0:b0:429:cc1d:a00c with SMTP id u12-20020ac858cc000000b00429cc1da00cmr2839097qta.89.1705130999805; Fri, 12 Jan 2024 23:29:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705130999; cv=pass; d=google.com; s=arc-20160816; b=k+Tr079FqTeFIeH6jJXi0e0nybVoUkkLMTX3xQel/j/H3uj7OJqV7agzLhD9AmIgpI DFb8gkWzaX2LYEZfQjsWoR1f6f2ibm1FGKVImtH0ZK5OfdKyI7Zr5HBKEjxsB+T9cmO6 n49503HQO1onQlrlxKKe/efryhSRNLMe0wSQ+oKfgMNrfSxuCO+OBlimGkEk6Ywz29E2 8HahpY/8G33lio64RrkaD4QmA8ctiiVCegRSQZxhNh+pYnxeu5Nti9Gr43xdPecJuPGG hqk1iSFEjt9EmaqjxA8q3BGvqNVSa0K0c8BbRqnuGQUOAC5zbUe5XUCVi8XBGSv8mS0Y 5E8Q== 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=rXwBSBw+08v47rdS5Z1U/7dsb82db2Qa5PMuAD8QPKM=; fh=6LgICDG6zE7j/CxCHu23CB0rJd/K2ImLz1UJ2l2oyZE=; b=Q73RacHsB+3b4p5GokDd35/AXwrMonU+PD+eOJMlwp9wja2dc2cq+pmmx9IIiR5p1p ckCzfH8XXoRp/XY5rQ684vuFyXEUviQm7fjWDltM0VfAPpRrRdyynL+mCay2RIr2XDzL LrB4znH8J7J2c41lXXPdkD93iCKHNh3Y8GBGxELxt7IiZQnl7vevW5XteWuJTE8JR9DN r+7IYwGNyID31IOCh16OTVMbYj2KLqcqQk+RFU/0uLyWURb4A1LCmDzZLmKH07qNgVse o0pES70c6ye/dToxcxGvjP0aTZUTq5TEBE2emdoRREzWj02cILg5gCQcWo6uP10Cet7/ vT8g== 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 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g22-20020ac87f56000000b00429b1db6325si4665044qtk.30.2024.01.12.23.29.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 23:29:59 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; 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 8.43.85.97 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 81EB13858C2D for ; Sat, 13 Jan 2024 07:29:59 +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 02FB73858403 for ; Sat, 13 Jan 2024 07:28:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02FB73858403 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 02FB73858403 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=1705130926; cv=none; b=aQXXI7qhbZQKt9Iq12EAaDmKNHom8vZiVRqznmDzp/eqBfg/9+BJEbGuVLBMphGyYPXiCwXXx94DQKqcHfbArtKOdz1J6/UWBdd+jLgJIdFDQiXOlptqIRD4irtVlYfcXkdkQq5/u5AjZpFYaJOtOOHa1kvt6BfSLx7Biv3f5fM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705130926; c=relaxed/simple; bh=ZGFOhTEX5Au6B5npzzL8qImGQ1fk5vPlujoQVfM/N30=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=ad5psDLK8N+1olIfAvdwzmNsxffo1MORPTSL1naZEtfsm53fOXheNJdRAbiCzoam93lQ4GxlETLAMT1AzqXyM1B0Si9zMBfFcVAaqouXmcXPZN/YH9k9uhf9RjmpIwh9nrFeIgejStQ7hAXIbuQFQPH3rDbW0odFnl8uIKq66co= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8Dx+empO6Jl1MEEAA--.9492S3; Sat, 13 Jan 2024 15:28:41 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx79+pO6Jles8XAA--.61902S4; Sat, 13 Jan 2024 15:28:41 +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:Fix fail in gen-vect-{2,25}.c file. Date: Sat, 13 Jan 2024 15:28:34 +0800 Message-Id: <20240113072834.32021-1-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cx79+pO6Jles8XAA--.61902S4 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQAPBWWh4SoAygAAsO X-Coremail-Antispam: 1Uk129KBj93XoW7AFyrJr17Cw17JFyxCr1Dtwc_yoW8ur4kpw nrury7Cr1rKFn3WFnFqF95Wr4rG3W7GFZ8uF9rK34I9FW7tr92qr1rtay7JF13Xa1rZr13 Xw4kuw15ua1SkrbCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkjb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j1LvtUUUUU= 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: 1787959442734820661 X-GMAIL-MSGID: 1787959442734820661 1.Added dg-do compile on LoongArch. When binutils does not support vector instruction sets, an error occurs because the assembler does not recognize vector instructions. 2.Added "-mlsx" option for vectorization on LoongArch. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/gen-vect-2.c: Added detection of compilation behavior and "-mlsx" option on LoongArch. * gcc.dg/tree-ssa/gen-vect-25.c: Dito. --- gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c | 2 ++ gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c index b84f3184427..a35999a172a 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c @@ -1,6 +1,8 @@ /* { dg-do run { target vect_cmdline_needed } } */ +/* { dg-do compile { target { loongarch_sx && {! loongarch_sx_hw } } } } */ /* { dg-options "-O2 -fno-tree-loop-distribute-patterns -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */ /* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-additional-options "-mlsx" { target { loongarch*-*-* } } } */ #include diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c index 18fe1aa1502..9f14a54c413 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c @@ -1,6 +1,8 @@ /* { dg-do run { target vect_cmdline_needed } } */ +/* { dg-do compile { target { loongarch_sx && {! loongarch_sx_hw } } } } */ /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */ /* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-additional-options "-mlsx" { target { loongarch*-*-* } } } */ #include