From patchwork Thu Sep 7 07:00:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 137611 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp2782762vqo; Thu, 7 Sep 2023 00:02:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGINevDCM1X+OK6AUmS3myctOX+vdQrWdpJ7VPI/bkY+c9SxTefu/QuEewq9SoNQAWywahV X-Received: by 2002:a17:907:7784:b0:9a1:ec69:23ec with SMTP id ky4-20020a170907778400b009a1ec6923ecmr3823495ejc.17.1694070159610; Thu, 07 Sep 2023 00:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694070159; cv=none; d=google.com; s=arc-20160816; b=n//czvzEPMG4/pJtdIMzsJy8kNgQfle1VULqDbvv+1AAlaAESGqkzaXQHCsJSDLduQ qbZYSyGi54BuN1vi8+he59d9K0HYte57cUt4rLoFFzD4tSYfMbnSmvgCFh6T1qrbaMpu mWm2E49cyQOinSrc9Jm+Hoi50VkprXnTL/Ij+GKEcGHsjC526k/YCriiKzeLxbU0mR8y ETZBSkX4firRY3BiyThbajf5LFf4P3LhuQYQcoGWtNhKYamMIXGuQeNJoi2aYVjXhHHb wyEhlLYYC6G5x0L8EPgc+6onUJX9I7aESqNewCL3r3DShJveArPw/Dt2+ltPseEYfC5x b/vg== 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=+jOBiftFos0RqeldrJuiRjkbV1/ifqRVX1LY7pkFjL4=; fh=BpFCyCzVJo4znJIvOjeDfKzcGsF6Q+JgJbJ+1ev/kM4=; b=x6VgJFA2X7Gahm5YvHmLALvLIILpuaVfvarz+BcgwpBBTOxqcvsMnb7tELNYUcztR1 jFYtqIqeNh0rmMSczaujC54B1tymUC/gdmFieKRwsaWfZked2ZcvL/JttXZdFTWRGqkP +lRK19uwI/MdsKbsYWyPDcCkEbGPsisuiZOuBJKB6u2Y2GO5JUe8Du4rdj8w8Q+FeGLY ndAXRS0TeKfN7RzkKTaG+PVegOvLdlplFQahXSPrJYfHlDAb0bBcp/NNr8arVgh1h5nl YoAjJB7alfDp8LW1mK68iAQYc5BbVYPnCExH4leVGVBHwq1gXvfsyMUEFFto7KiPphEs k5dA== 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 a8-20020a1709066d4800b0099ba1cf9543si10202491ejt.460.2023.09.07.00.02.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 00:02:39 -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 E8FB13853D3B for ; Thu, 7 Sep 2023 07:01:57 +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 DEBDF3858D37 for ; Thu, 7 Sep 2023 07:01:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DEBDF3858D37 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 _____8BxpPA_dflksSYhAA--.662S3; Thu, 07 Sep 2023 15:01:19 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxzyM6dflkIzFwAA--.31156S5; Thu, 07 Sep 2023 15:01:18 +0800 (CST) From: Xiaolong Chen To: gcc-patches@gcc.gnu.org Subject: [PATCH v2 1/4] LoongArch: Add tests of -mstrict-align option. Date: Thu, 7 Sep 2023 15:00:58 +0800 Message-Id: <20230907070101.22062-2-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230907070101.22062-1-chenxiaolong@loongson.cn> References: <20230907070101.22062-1-chenxiaolong@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxzyM6dflkIzFwAA--.31156S5 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQAHBWT5TbUBTgAAsp X-Coremail-Antispam: 1Uk129KBj9xXoWruw4Dtw48tFW5tFW7JF1kJFc_yoWfJrXEkF 12q3s3Gr4Uua1xCFWvvry5CF9akws3XFySqF4FqFs7XFyDXFs0yFWDJFy7ZFyjyr18JFZx GFZavr1SyF9xtosvyTuYvTs0mTUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb7AYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JF0_Jw1lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF 04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7 CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8wNVDUUUUU== X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, 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: 1776361311900835281 X-GMAIL-MSGID: 1776361311900835281 gcc/testsuite/ChangeLog: * gcc.target/loongarch/strict-align.c: New test. --- gcc/testsuite/gcc.target/loongarch/strict-align.c | 13 +++++++++++++ 1 file changed, 13 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..bcad2b84f68 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/strict-align.c @@ -0,0 +1,13 @@ +/* { 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]; +} +