public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: "Robin Dapp" <rdapp.gcc@gmail.com>, 钟居哲 <juzhe.zhong@rivai.ai>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	palmer <palmer@dabbelt.com>, "kito.cheng" <kito.cheng@gmail.com>
Subject: Re: [PATCH] RISC-V: vsetvl: Refine REG_EQUAL equality.
Date: Mon, 13 Nov 2023 11:01:57 -0700	[thread overview]
Message-ID: <a06f8e19-856a-4ec6-b3d8-7bbe4e2bc532@gmail.com> (raw)
In-Reply-To: <6f1a21c1-8f11-4d64-a10f-4397fb84f836@gmail.com>



On 11/13/23 07:47, Robin Dapp wrote:
> As per Jeff's remark I'm going to push the attached.
> 
> Regards
>   Robin
> 
> Subject: [PATCH v4] RISC-V: vsetvl: Refine REG_EQUAL equality.
> 
> This patch enhances the equality check for REG_EQUAL notes in the vsetvl
> pass by using the == operator instead of rtx_equal_p.  With that, in
> situations like the following, a5 and a7 are not considered equal
> anymore.
One final note.  The register allocator tries to promote REG_EQUAL notes 
to REG_EQUIV notes when it's provably safe.  I don't think that code is 
terribly aggressive and I doubt it'd kick in for the forms shown below.

> 
> (insn 62 60 63 4 (set (reg:DI 17 a7 [orig:154 loop_len_54 ] [154])
>          (umin:DI (reg:DI 15 a5 [orig:174 _100 ] [174])
>              (reg:DI 30 t5 [219]))) 442 {umindi3}
>       (expr_list:REG_EQUAL (umin:DI (reg:DI 15 a5 [orig:174 _100 ] [174])
>              (const_int 8 [0x8]))
>          (nil)))
> (insn 63 62 65 4 (set (reg:DI 15 a5 [orig:175 _103 ] [175])
>          (minus:DI (reg:DI 15 a5 [orig:174 _100 ] [174])
>              (reg:DI 17 a7 [orig:154 loop_len_54 ] [154]))) 11 {subdi3}
>       (nil))
> (insn 65 63 66 4 (set (reg:DI 16 a6 [orig:153 loop_len_53 ] [153])
>          (umin:DI (reg:DI 15 a5 [orig:175 _103 ] [175])
>              (reg:DI 30 t5 [219]))) 442 {umindi3}
>       (expr_list:REG_EQUAL (umin:DI (reg:DI 15 a5 [orig:175 _103 ] [175])
>              (const_int 8 [0x8]))
>          (nil)))
> 

Jeff

      reply	other threads:[~2023-11-13 18:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13  8:06 Robin Dapp
2023-11-13  8:10 ` juzhe.zhong
2023-11-13  8:12   ` Robin Dapp
2023-11-13  8:15     ` juzhe.zhong
2023-11-13 13:44       ` Jeff Law
2023-11-13  8:19     ` juzhe.zhong
2023-11-13  8:25     ` juzhe.zhong
2023-11-13  9:25       ` Robin Dapp
2023-11-13  9:30         ` juzhe.zhong
2023-11-13  9:34           ` Robin Dapp
2023-11-13  9:38             ` juzhe.zhong
2023-11-13 10:31               ` Robin Dapp
2023-11-13 10:36                 ` juzhe.zhong
2023-11-13 13:28                   ` Robin Dapp
2023-11-13 13:34                     ` 钟居哲
2023-11-13 14:47                       ` Robin Dapp
2023-11-13 18:01                         ` Jeff Law [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a06f8e19-856a-4ec6-b3d8-7bbe4e2bc532@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=rdapp.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).