From patchwork Mon Sep 11 03:44:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 137874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp1857474vqo; Sun, 10 Sep 2023 20:47:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHXGShKrGmzwPUmBT3x1w2tuiDs/msTZt4iAdj32Mq4lvMS7DVMGA3APS2B0du2M15qSKEJ X-Received: by 2002:a17:906:1db2:b0:99c:85af:7aa6 with SMTP id u18-20020a1709061db200b0099c85af7aa6mr8222028ejh.28.1694404055817; Sun, 10 Sep 2023 20:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694404055; cv=none; d=google.com; s=arc-20160816; b=ln3wjYb+SJGffcp4QNO4IlSej499j5pl0irHJQT8zsiyp5fVoxdL4o4ihIRcEBKSCa M7c/eWJ4PjzhUDdeW+nXBFN6PG+EPoetB9q+WgIzuPXGCxO/Zc9hFF1IEeGbTIaUHtEL rBSFIrCYFnay6nTtZPu+qvF8QqgwziZbAdXPoyPp9OoJQaVf1I97FoN7cSYukQ8q2zvK qSBOsTf9CGZ+pY0V4Ej0SSMwh1R0qks+l4dpGwYzdAZmGnZcYPMmQU703mAVtVutFWyh i95SSxHy3YcBq9bWK8gkbRx+Ru4i4Kf6obL8LsaojfuA9FRtDW71WAVWvWDHVvmNMbXe RRWg== 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:references:in-reply-to:message-id:date:subject:to:from :dmarc-filter:delivered-to; bh=R7V73w2jK8oRRkWKth5D455cY8tZTNMUbYiRVEfG9go=; fh=BpFCyCzVJo4znJIvOjeDfKzcGsF6Q+JgJbJ+1ev/kM4=; b=nXYckqvlOcZJpk1heo925rFT1BaJgGfEpS6xcn4HnYdXyvLl40avFWY2DC3LjqFdo2 Hue5FLLNEcGswXCKJtaHIY1mkACZVAinEAaf/gMwRHDrtsP3N1iSwJQ49mQ97Zfrz/VA eC+6/6YKyiAXmGZtRtvVEh3EOs/SUs5eInRu4mQteWfXWUCAaEzJvP3nITAzMgJjIk2e taqJhb3XrmMmo2tdi9II/E1NxQ3u6ki2TaDqyPv0N7RN+8o2TCtgRkW4apU80s5BoRfV YqgGX9pHBAmjvjrErw3/WJ0lagvpya8U2+bLcfVJ8Lb70Sazje6iTEK5qL9YrCzlfmj2 8ddQ== 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 lc14-20020a170906dfee00b0099e028b0201si5839924ejc.962.2023.09.10.20.47.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 20:47:35 -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 B8E773831390 for ; Mon, 11 Sep 2023 03:46:13 +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 003383857705 for ; Mon, 11 Sep 2023 03:45:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 003383857705 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=loongson.cn Received: from mail.loongson.cn ([114.242.206.163]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfXro-00074G-Lb for gcc-patches@gcc.gnu.org; Sun, 10 Sep 2023 23:45:44 -0400 Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8BxuOhbjf5k4EQkAA--.35357S3; Mon, 11 Sep 2023 11:45:31 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dx_yNXjf5kzKZ2AA--.44820S5; Mon, 11 Sep 2023 11:45:30 +0800 (CST) From: Xiaolong Chen To: gcc-patches@gcc.gnu.org Subject: [PATCH v3 1/9] LoongArch: Add tests of -mstrict-align option. Date: Mon, 11 Sep 2023 11:44:31 +0800 Message-Id: <20230911034439.8266-2-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230911034439.8266-1-chenxiaolong@loongson.cn> References: <20230911034439.8266-1-chenxiaolong@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Dx_yNXjf5kzKZ2AA--.44820S5 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQALBWT9QjYDlAAAs1 X-Coremail-Antispam: 1Uk129KBj9xXoWruw4kJw4fJw13Zw13Gw13Jrc_yoWfJrcEyF y7X3s3Gr4Uua1xCFW0vryUCF9akws3XFySqFWFqFs7XFyDXFs0yFWDJFZrZFyjkr18JFZx Ga9avrnayF9xtosvyTuYvTs0mTUanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb7AYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JF0_Jw1lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF 04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU82g43UUUUU== 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, SPF_FAIL, SPF_HELO_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: 1776711427261277556 X-GMAIL-MSGID: 1776711427261277556 gcc/testsuite/ChangeLog: * gcc.target/loongarch/strict-align.c: New test. --- gcc/testsuite/gcc.target/loongarch/strict-align.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 gcc/testsuite/gcc.target/loongarch/strict-align.c diff --git a/gcc/testsuite/gcc.target/loongarch/strict-align.c b/gcc/testsuite/gcc.target/loongarch/strict-align.c new file mode 100644 index 00000000000..040d849584b --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/strict-align.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-Ofast -mstrict-align -mlasx" } */ +/* { dg-final { scan-assembler-not "vfadd.s" } } */ + +void +foo (float *restrict x, float *restrict y) +{ + x[0] = x[0] + y[0]; + x[1] = x[1] + y[1]; + x[2] = x[2] + y[2]; + x[3] = x[3] + y[3]; +}