Message ID | oro7smxieq.fsf@lxoliva.fsfla.org |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp734096wrr; Fri, 2 Dec 2022 01:30:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf5TlL/PFxIUgxb5DpwNE/1/StGb3h7fLee97tNL6LhlM0VM7kecrS9Fzxhi8HNOc+J8ivkx X-Received: by 2002:a17:906:70ca:b0:7ae:fbe8:a73f with SMTP id g10-20020a17090670ca00b007aefbe8a73fmr59692299ejk.479.1669973449599; Fri, 02 Dec 2022 01:30:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669973449; cv=none; d=google.com; s=arc-20160816; b=yhIBD9VF4gW3CI5/pER5vzTgvI9NSuliLZu0OhrtgoMl3ffsAcrnaPtErzOfO9M9tW ZBHK7Ub1ZTVt2YT4jkpoX7XSr6oMfvdtng33BF0ktyPNPHaGHC+ZzOIOMfP6kw+wTU+4 Cl89rXcEspOJinot5QKiX+JZVCOIcU+k12/OFWTWVdL8LsNKwGGTApBRsf7l2H5zIOw5 FaBOSWS7NoFusQYff1oXUHpwb6QSWzJc20Y1DsuvR9cw8ZsVOExUBoP5hR8gHThmXtBV js/Ifv/C7PNJL2eejidu9n+REDRU4wWXGvslVqENrzgs252eYefrjHY7DhVMTZu3qeZc RdQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :user-agent:message-id:date:organization:subject:cc:to:dmarc-filter :delivered-to:dkim-signature:dkim-filter; bh=BbcUa+3PozpyGRoWzxBkAyXUGwbQbVasI2h21RlQKX8=; b=eDHUydAiePwjyjEIu0duIBsZsk7vg472PaSkyF6ZA5ga92LMuQAANrGsxCuwzBaok6 LW0Tym5dtIV3bIQdzLAhcjL3BZfuBBUmBf8XsSuxBbR4FYsyS9hSys5++ahOsCp6cYKh WWev/qMqBtDhC2yfB37A8RryZRmDxQsllfXTPUn53AOugmEOT9P7UR78NAMcVJuPw3gp oEsrk4QeH4KJa9tpNiVPXVQLT7rH1lxmf4YJtksEGP/WNzsTiWxLN0woJHl3jIul3WTe b8DJ9//PuP2cb4QjMokhq7TGn7V9adH7Sph0BKnrjKpRxErWswAaxAYtIUWnPhdaGpXc svnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NhR5fHAS; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hv12-20020a17090760cc00b007baa6e22742si6735179ejc.570.2022.12.02.01.30.49 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 01:30:49 -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; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NhR5fHAS; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B8EC3858C33 for <ouuuleilei@gmail.com>; Fri, 2 Dec 2022 09:30:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B8EC3858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669973448; bh=BbcUa+3PozpyGRoWzxBkAyXUGwbQbVasI2h21RlQKX8=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=NhR5fHASzsisM7h4pDtzsvh0b8yznETwoDw141shEQnC+N7JA5y1/vJwMp9l1g/PD OxIa+Pigj3TuwKAGi2gTIiu+tG6us8Z/2Yi+w7xWLnrgoBzbAbug9CXPG8YgpA0O6J o5brVTQs2uPgHnkBl5A3iRs5sHhSZoeSmayxnbvc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTPS id 800923858C52 for <gcc-patches@gcc.gnu.org>; Fri, 2 Dec 2022 09:29:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 800923858C52 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5602A116B1E; Fri, 2 Dec 2022 04:29:58 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FrsjjcfIALhZ; Fri, 2 Dec 2022 04:29:58 -0500 (EST) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 0B01C116562; Fri, 2 Dec 2022 04:29:57 -0500 (EST) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 2B29Tn0d1291384 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 2 Dec 2022 06:29:49 -0300 To: gcc-patches@gcc.gnu.org Cc: Nick Clifton <nickc@redhat.com>, Richard Earnshaw <richard.earnshaw@arm.com>, Ramana Radhakrishnan <ramana.gcc@gmail.com>, Kyrylo Tkachov <kyrylo.tkachov@arm.com> Subject: [PATCH] [PR40457] [arm] expand SI-aligned movdi into pair of movsi Organization: Free thinker, does not speak for AdaCore Date: Fri, 02 Dec 2022 06:29:49 -0300 Message-ID: <oro7smxieq.fsf@lxoliva.fsfla.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, 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.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Alexandre Oliva via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Alexandre Oliva <oliva@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751094079907900286?= X-GMAIL-MSGID: =?utf-8?q?1751094079907900286?= |
Series |
[PR40457,arm] expand SI-aligned movdi into pair of movsi
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Alexandre Oliva
Dec. 2, 2022, 9:29 a.m. UTC
When expanding a misaligned DImode move, emit aligned SImode moves if the parts are sufficiently aligned. This enables neighboring stores to be peephole-combined into stm, as expected by the PR40457 testcase, even after SLP vectorizes the originally aligned SImode stores into a misaligned DImode store. Regstraped on x86_64-linux-gnu, also tested with crosses to riscv64-elf and arm-eabi (tms570). Ok to install? for gcc/ChangeLog PR target/40457 * config/arm/arm.md (movmisaligndi): Prefer aligned SImode moves. --- gcc/config/arm/arm.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
Comments
On 02/12/2022 09:29, Alexandre Oliva via Gcc-patches wrote: > > When expanding a misaligned DImode move, emit aligned SImode moves if > the parts are sufficiently aligned. This enables neighboring stores > to be peephole-combined into stm, as expected by the PR40457 testcase, > even after SLP vectorizes the originally aligned SImode stores into a > misaligned DImode store. > > Regstraped on x86_64-linux-gnu, also tested with crosses to riscv64-elf > and arm-eabi (tms570). Ok to install? > > > for gcc/ChangeLog > > PR target/40457 > * config/arm/arm.md (movmisaligndi): Prefer aligned SImode > moves. OK. R. > --- > gcc/config/arm/arm.md | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md > index 69bf343fb0ed6..a9eb0299aa761 100644 > --- a/gcc/config/arm/arm.md > +++ b/gcc/config/arm/arm.md > @@ -12783,8 +12783,16 @@ (define_expand "movmisaligndi" > rtx hi_op0 = gen_highpart_mode (SImode, DImode, operands[0]); > rtx hi_op1 = gen_highpart_mode (SImode, DImode, operands[1]); > > - emit_insn (gen_movmisalignsi (lo_op0, lo_op1)); > - emit_insn (gen_movmisalignsi (hi_op0, hi_op1)); > + if (aligned_operand (lo_op0, SImode) && aligned_operand (lo_op1, SImode)) > + { > + emit_move_insn (lo_op0, lo_op1); > + emit_move_insn (hi_op0, hi_op1); > + } > + else > + { > + emit_insn (gen_movmisalignsi (lo_op0, lo_op1)); > + emit_insn (gen_movmisalignsi (hi_op0, hi_op1)); > + } > DONE; > }) > >
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 69bf343fb0ed6..a9eb0299aa761 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -12783,8 +12783,16 @@ (define_expand "movmisaligndi" rtx hi_op0 = gen_highpart_mode (SImode, DImode, operands[0]); rtx hi_op1 = gen_highpart_mode (SImode, DImode, operands[1]); - emit_insn (gen_movmisalignsi (lo_op0, lo_op1)); - emit_insn (gen_movmisalignsi (hi_op0, hi_op1)); + if (aligned_operand (lo_op0, SImode) && aligned_operand (lo_op1, SImode)) + { + emit_move_insn (lo_op0, lo_op1); + emit_move_insn (hi_op0, hi_op1); + } + else + { + emit_insn (gen_movmisalignsi (lo_op0, lo_op1)); + emit_insn (gen_movmisalignsi (hi_op0, hi_op1)); + } DONE; })