From patchwork Wed Sep 6 10:43:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenxiaolong X-Patchwork-Id: 137567 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp2224087vqo; Wed, 6 Sep 2023 03:44:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFX3qRN33GKTaGz6CoYeXj4prqh8+CU8W8AvXB3hzK5gNUmDEH0e9SCbSpGlHwyzOtjO1Tm X-Received: by 2002:a17:906:1099:b0:99c:5056:4e2e with SMTP id u25-20020a170906109900b0099c50564e2emr1774902eju.31.1693997061550; Wed, 06 Sep 2023 03:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693997061; cv=none; d=google.com; s=arc-20160816; b=JvgKWUOW+8rX860ayI6fGB7me9cAWs9opq75dwq8mjeVYp8xD4dZFpcoN0NRDH66XL FR/ZOJUERVeJGhwKptj8OStZFTgaylEuDwatQ9oNfLAfBf2QCMq79UDDgYbClO+njOd3 v/yCk8xxHRP//vo6EA7m0y1cGWuXKdDFZsg7SdSHv4fC3FZqHxGfxC3xM7vhxQPlP+PS mutEbaFv0BVnkisY2k2PEPQb2KKuFtqrPkTsAE7TQ/245je/9juCP5Ns6cmKg9Fez+eY gAgeMn/G5udFseBJNXXm3XoDtXnU1wsbVCyvoTcSM2XcUG1aR9QaWUNhMr5nYS92E1ij A6dg== 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=nipdkKlvOJFP7O4Oe8puojFbw45+QTt0Q09pvApNpvkU1L946sZIzUlH03qDtdFurS j0/mgjT93ZCetceWmBHKpc3dB4puW6Q3QcBoBDQYwZbep4aw/a7oePrFdyc42ctBHQcB ZzdwbD3cWxYz9+Nocw6tRberFL4t/Ws09GoumVJXqq1AiiTO6UD6DmbYi39vsZMOyrv1 Tp41/gbS4umgPj2URf9KlV1CLO/Z2Yeuumfq+EZajW0dQnYtbDEw9u2sq54aQpKGsnPT Tvdj43C2sZp2bT/HZvyebihU5QaSs/klmPQrOmDWmiL4K8fU/PjrnyOxTdNgo/0kuxi2 z6GQ== ARC-Authentication-Results: i=1; mx.google.com; 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 p26-20020a170906b21a00b0099279210460si9808179ejz.643.2023.09.06.03.44.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 03:44:21 -0700 (PDT) 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; 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 5274B3858288 for ; Wed, 6 Sep 2023 10:43:50 +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 862883858402 for ; Wed, 6 Sep 2023 10:43:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 862883858402 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 1qdq0H-0006hF-3x for gcc-patches@gcc.gnu.org; Wed, 06 Sep 2023 06:43:25 -0400 Received: from loongson.cn (unknown [10.10.130.252]) by gateway (Coremail) with SMTP id _____8CxNvHEV_hkXVAgAA--.64551S3; Wed, 06 Sep 2023 18:43:16 +0800 (CST) Received: from slurm-master.loongson.cn (unknown [10.10.130.252]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxriO8V_hkPXpuAA--.28525S5; Wed, 06 Sep 2023 18:43:15 +0800 (CST) From: Xiaolong Chen To: gcc-patches@gcc.gnu.org Subject: [PATCH v1 1/4] LoongArch: Add tests of -mstrict-align option. Date: Wed, 6 Sep 2023 18:43:04 +0800 Message-Id: <20230906104307.37244-2-chenxiaolong@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230906104307.37244-1-chenxiaolong@loongson.cn> References: <20230906104307.37244-1-chenxiaolong@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8CxriO8V_hkPXpuAA--.28525S5 X-CM-SenderInfo: hfkh05xldrz0tqj6z05rqj20fqof0/1tbiAQAGBWT3-DUFCwAAsW X-Coremail-Antispam: 1Uk129KBj9xXoWruw4Dtw48tFW5tFW7JF1kJFc_yoWfJrXEkF 12q3s3Gr4Uua1xCFWvvry5CF9akws3XFySqF4FqFs7XFyDXFs0yFWDJFy7ZFyjyr18JFZx GFZavr1SyF9xtosvyTuYvTs0mTUanT9S1TB71UUUUUDqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb7xYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Cr1j6rxdM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r126r1DMcIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64 vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8G jcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2I x0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK 8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I 0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07j83kZUUUUU= 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.5 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: 1776284662361848097 X-GMAIL-MSGID: 1776284662361848097 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]; +} +