From patchwork Thu Sep 7 07:00:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 13799 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp2782652vqo; Thu, 7 Sep 2023 00:02:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHX8KXspH1U1jnaFYiNl0OGqSHfJcRGltyGf7K3MVf2e6B4nr3gFif55aSvwC0zldcreLdL X-Received: by 2002:a19:5048:0:b0:500:7f71:e46b with SMTP id z8-20020a195048000000b005007f71e46bmr4118147lfj.1.1694070147012; Thu, 07 Sep 2023 00:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694070146; cv=none; d=google.com; s=arc-20160816; b=lhxhP1EDKk5QE6WRLnZ2eYMK4Dtz+UQ2TGOeJ1qcT4lM2mbvk0XMICXCjNvu2WZO0J 7rEsrfWLjyEw9piwnJFIeSYW5aK8dOa1GH3uUKbNTyHVSotj0cA7aQzYOv1P00vaAGmO aXQPJHVbwqXuNB0tuzpH7mqknRTc0wI+Dv6DxE0CDeBnoYxgEnA2ym7ASxpnjftLRxUS 5ejgtBsir/8iuh5vFUJSS01Kby1d1rdX1uIhkKbcvsoCU62Y8An0V2msQSnTb8QcKXd/ 7HCinRZgNV2WGkndS0HkEvWm2JI9j1WqHnzsTBQ5mGvU7EO9PNHppfDs3C+nnIw/iW7A SA/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dmarc-filter :delivered-to; bh=ZSz8SXzZ4CAIFJjpLPX/PrezDQZocX2b0wsZJNP2nDc=; fh=BpFCyCzVJo4znJIvOjeDfKzcGsF6Q+JgJbJ+1ev/kM4=; b=xYt4wYF5uKBc7SNQ5BvtkzAF3NNYV2+syzFzhMG+Hxu56nYbEz0iAKEy3/P7bJyFV6 NLyPJu80koa9cIxnglDstEKM3kyDeYHzmPC9zZ1TKlkPJ6aT908x0+fNbOH746MRqgqZ jEWVWW2x387ShQH6SFYogld44sQqeTa8Y/VqwVheSO2J7tdL3tdDFI04n/DY7tPewySV p/46oLxk3r6/TSv+CnSr7az7fRfSkPRfQA1q2hvm9PuPkLwSZ8XYDke+xgEC9boceZ6v SYhUswU08O17NdDNWYP6uBwlr1TryNW+HgsK5xUI5ohRDEExXAyoIlSVU4v09W15nzaX RSJA== ARC-Authentication-Results: i=1; mx.google.com; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id kd9-20020a17090798c900b009929eee322dsi10130851ejc.180.2023.09.07.00.02.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 00:02:26 -0700 (PDT) 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; 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 534DA3856DDA for ; Thu, 7 Sep 2023 07:01:54 +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 A2B9C3858D35 for ; Thu, 7 Sep 2023 07:01:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A2B9C3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8Cxbes8dflkriYhAA--.63948S3; Thu, 07 Sep 2023 15:01:16 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxzyM6dflkIzFwAA--.31156S4; Thu, 07 Sep 2023 15:01:14 +0800 (CST) From: Xiaolong Chen To: gcc-patches@gcc.gnu.org Subject: [PATCH v2 0/4] Add Loongson SX/ASX instruction support to Date: Thu, 7 Sep 2023 15:00:57 +0800 Message-Id: <20230907070101.22062-1-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxzyM6dflkIzFwAA--.31156S4 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQAHBWT5TbUBTAAAsr X-Coremail-Antispam: 1Uk129KBj93XoWxCr17WF13Cw45Gw1UXr47trc_yoW5XF17pw 47Ary5t3W8WFZ3Xr1kJay5Xrs5tan7G3yS93WfJry8C34xJr9xZ3Z7tFnxXFy3Ga45Jryr XwnY93WUWas0qacCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUkFb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv 67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2 Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s02 6x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0x vE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6x kF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07UE-erUUUUU= X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP 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: , Cc: Xiaolong Chen , xuchenghua@loongson.cn, chenglulu@loongson.cn, i@xen0n.name Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776361298421387115 X-GMAIL-MSGID: 1776361298421387115 In order to better test the function of the vector instruction, the 128 and 256 bit test cases are further split according to the function of the instruction. Xiaolong Chen (4): LoongArch: Add tests of -mstrict-align option. LoongArch: Add testsuite framework for Loongson SX/ASX. LoongArch: Add tests for Loongson SX builtin functions. LoongArch:Add Loongson SX/ASX instruction support to LoongArch .../gcc.target/loongarch/strict-align.c | 13 + .../loongarch/vector/loongarch-vector.exp | 42 + .../loongarch/vector/lsx/lsx-builtin.c | 1461 +++++++++++++++++ .../loongarch/vector/lsx/lsx-vfcvt-1.c | 397 +++++ .../loongarch/vector/lsx/lsx-vfcvt-2.c | 277 ++++ .../loongarch/vector/lsx/lsx-vffint-1.c | 160 ++ .../loongarch/vector/lsx/lsx-vffint-2.c | 263 +++ .../loongarch/vector/lsx/lsx-vffint-3.c | 101 ++ .../loongarch/vector/lsx/lsx-vfrint_d.c | 229 +++ .../loongarch/vector/lsx/lsx-vfrint_s.c | 349 ++++ .../loongarch/vector/lsx/lsx-vftint-1.c | 348 ++++ .../loongarch/vector/lsx/lsx-vftint-2.c | 694 ++++++++ .../loongarch/vector/lsx/lsx-vftint-3.c | 1027 ++++++++++++ .../loongarch/vector/lsx/lsx-vftint-4.c | 344 ++++ .../loongarch/vector/simd_correctness_check.h | 39 + 15 files changed, 5744 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/strict-align.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/loongarch-vector.exp create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-builtin.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfcvt-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vffint-3.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_d.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vfrint_s.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-1.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-2.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-3.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/lsx/lsx-vftint-4.c create mode 100644 gcc/testsuite/gcc.target/loongarch/vector/simd_correctness_check.h