From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 9891A3858401 for ; Thu, 1 Jun 2023 14:20:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9891A3858401 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b024e29657so3868745ad.3 for ; Thu, 01 Jun 2023 07:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685629230; x=1688221230; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jOYyR+JTudL15/XDQmVTTKF08u0ZouzvH51eYWEm/kY=; b=NvwMyg45+Mu9OIoKyB9HYFeazvoTtQGiJ6dHAvxHh9+La3ziG9GvQIKL5HVxFY0qN1 UAATTeAHdj7clAPNToyFKpb7S4btLVXHGGyVPhLRNhkibI0BEuZGdFii76Sp/iN2RiyA H1p+3ieGAtpjo25B42UGQ7v1PdN7zTYhxA9tq3S+a+jFKN6RbNHNnLH3uMH+EjznPLMk lvneut3JtceNMbKl34h5HdvTV61GwBTNKqwYkQUeEU6ZAVN3qNSJWt40II5axQzP5rrm LursIg5Itpa9rDUJvs62fv5ahcJ7BPvXzd2ZrqyVD83Z142E4p7fJSs4nCX8Ei077Aaw fTkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685629230; x=1688221230; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jOYyR+JTudL15/XDQmVTTKF08u0ZouzvH51eYWEm/kY=; b=hcZ6IHkcD72LuDGYxyJTaT/lno0XtDh9zq5yAT5WOLCgV/c5IJBIt4xDevsNZIPFzm dXbeaPJ2AT75qh8YojXwxwkvjAcO5yo8qrxmOEwv/L9xbRLQ9kbPXdw+BLgRflf2gcvv Vv6bz8XlKlSG9/8hGw0fFloHcL8KnqYqO6lPbOL7/harKK9o+HrL0UTbLnYbkuZK4c8v pupZo5WH4XnZyc+jUu2bWv79JTLhFN3q7jgisxZByoZbdNrNVAFV0O1onNNkzAB08W3j dabcyO0mBUazL1AmaCITTyzYUgyS0S9WRVds1ejfklVe+K0nlRSADBrbipu5jhA0qil2 4fPQ== X-Gm-Message-State: AC+VfDxX8BIKDSiB2Wrhu6w3hy2NRLg/Vz76AERolLKtla2hBCED17hE dS88/Q1zhNM478d9fHvALKu24jEneEw74Xp7IeA= X-Google-Smtp-Source: ACHHUZ54g2Z32jCvHD0+b50a+MyZnOf1F5RJck1ztzSCesMYYJaZDpu4uXgqtdNTlDNaT2c3tGkCEdH8U5HZQEZP3Og= X-Received: by 2002:a17:902:e5c2:b0:1a9:9ace:3e74 with SMTP id u2-20020a170902e5c200b001a99ace3e74mr6684630plf.65.1685629230526; Thu, 01 Jun 2023 07:20:30 -0700 (PDT) MIME-Version: 1.0 References: <95b8b130-caef-12c8-b247-25ec7dbf0ac3.ref@yahoo.co.jp> <95b8b130-caef-12c8-b247-25ec7dbf0ac3@yahoo.co.jp> <931ab50b-8b5a-4979-b442-f193896a1a4f@yahoo.co.jp> In-Reply-To: <931ab50b-8b5a-4979-b442-f193896a1a4f@yahoo.co.jp> From: Max Filippov Date: Thu, 1 Jun 2023 07:20:19 -0700 Message-ID: Subject: Re: [PATCH 2/3 v3] xtensa: Add 'adddi3' and 'subdi3' insn patterns To: "Takayuki 'January June' Suwa" Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,GIT_PATCH_0,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, May 31, 2023 at 11:01=E2=80=AFPM Takayuki 'January June' Suwa wrote: > More optimized than the default RTL generation. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (adddi3, subdi3): > New RTL generation patterns implemented according to the instruc- > tion idioms described in the Xtensa ISA reference manual (p. 600)= . > --- > gcc/config/xtensa/xtensa.md | 52 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 52 insertions(+) > > diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md > index eda1353894b..21afa747e89 100644 > --- a/gcc/config/xtensa/xtensa.md > +++ b/gcc/config/xtensa/xtensa.md > @@ -190,6 +190,35 @@ > (set_attr "mode" "SI") > (set_attr "length" "3")]) > > +(define_expand "adddi3" > + [(set (match_operand:DI 0 "register_operand") > + (plus:DI (match_operand:DI 1 "register_operand") > + (match_operand:DI 2 "register_operand")))] > + "" > +{ > + rtx lo_dest, hi_dest, lo_op0, hi_op0, lo_op1, hi_op1; > + rtx_code_label *label; > + if (rtx_equal_p (operands[0], operands[1]) > + || rtx_equal_p (operands[0], operands[2]) > + || ! REG_P (operands[1]) || ! REG_P (operands[2])) I wonder if these additional conditions are necessary, given that the operands have the "register_operand" predicates? --=20 Thanks. -- Max