public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "juzhe.zhong@rivai.ai" <juzhe.zhong@rivai.ai>
To: richard.sandiford <richard.sandiford@arm.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,  rguenther <rguenther@suse.de>
Subject: Re: Re: [PATCH V14] VECT: Add decrement IV iteration loop control by variable amount support
Date: Thu, 25 May 2023 11:05:33 +0800	[thread overview]
Message-ID: <9BA82A9501B7D08D+20230525110533020956240@rivai.ai> (raw)
In-Reply-To: <mpto7m9cx76.fsf@arm.com>

[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]

Hi, Richard. 
After several tries with your testcases (I already added into V15 patch).
I think "using a new IV" would be better than "multiplication"

Now:
 loop_len_34 = MIN_EXPR <ivtmp_72, 8>;
  _74 = MIN_EXPR <ivtmp_75, 16>;   ------> multiplication approach will changed into  _74 = loop_len_34  * 2;
  loop_len_48 = MIN_EXPR <_74, 4>;
  _77 = _74 - loop_len_48;
  loop_len_49 = MIN_EXPR <_77, 4>;
  _78 = _77 - loop_len_49;
  loop_len_50 = MIN_EXPR <_78, 4>;
  loop_len_51 = _78 - loop_len_50;

I prefer "new IV" since it looks more reasonable and better codegen.
Could you take a look at it:
V15 patch:
https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619534.html 
  
Thanks.


juzhe.zhong@rivai.ai
 
From: Richard Sandiford
Date: 2023-05-25 04:05
To: 钟居哲
CC: gcc-patches; rguenther
Subject: Re: [PATCH V14] VECT: Add decrement IV iteration loop control by variable amount support
I'll look at the samples tomorrow, but just to address one thing:
 
钟居哲 <juzhe.zhong@rivai.ai> writes:
>>> What gives the best code in these cases?  Is emitting a multiplication
>>> better?  Or is using a new IV better?
> Could you give me more detail information about "new refresh IV" approach.
> I'd like to try that.
 
By “using a new IV” I meant calling vect_set_loop_controls_directly
for every rgroup, not just the first.  So in the earlier example,
there would be one decrementing IV for x and one decrementing IV for y.
 
Thanks,
Richard
 
 
 

  reply	other threads:[~2023-05-25  3:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 14:48 juzhe.zhong
2023-05-24 15:07 ` Richard Sandiford
2023-05-24 15:13   ` 钟居哲
2023-05-24 15:31     ` Richard Sandiford
2023-05-24 15:42       ` 钟居哲
2023-05-24 15:47         ` Richard Sandiford
2023-05-24 15:52           ` 钟居哲
2023-05-24 16:00             ` Richard Sandiford
2023-05-24 16:15               ` 钟居哲
2023-05-24 16:37               ` 钟居哲
2023-05-24 20:05                 ` Richard Sandiford
2023-05-25  3:05                   ` juzhe.zhong [this message]
     [not found]   ` <2023052423130398041121@rivai.ai>
2023-05-24 15:31     ` 回复: " 钟居哲

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=9BA82A9501B7D08D+20230525110533020956240@rivai.ai \
    --to=juzhe.zhong@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --cc=richard.sandiford@arm.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).