public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@arm.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: Andrea Corallo <andrea.corallo@arm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	Segher Boessenkool <segher@kernel.crashing.org>,
	Bill Schmidt <wschmidt@linux.ibm.com>,
	Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH] vect: Fix epilogue loop handling of partial vectors
Date: Wed, 23 Sep 2020 12:33:40 +0100	[thread overview]
Message-ID: <mpt1risiv6z.fsf@arm.com> (raw)
In-Reply-To: <87fdf142-d97e-0aa6-283b-ebecfa2bde7c@linux.ibm.com> (Kewen Lin's message of "Wed, 23 Sep 2020 11:07:33 +0800")

"Kewen.Lin" <linkw@linux.ibm.com> writes:
> on 2020/9/22 下午10:34, Richard Sandiford wrote:
>> Also, while splitting out the logic that handles epilogues with
>> constant iterations, I added a check to make sure that we don't
>> try to use partial vectors to vectorise a single-scalar loop.
>> This required some changes to the Power tests.
>
> Thanks for the great rework!  Using partial vector should be more
> costly than just being with one single scalar iteration, I think
> this is an improvement.  But I'm not sure whether someone would
> argue that in the context of no-vect-cost-model, it's expected to
> go with vectorized code, cost-modeling check can punt this when
> it takes effects.  Personally I'm fine on this anyway.

Yeah, if we costed the epilogue loop against its final iteration
count, we'd hopefully reject it then.  But the same problem applies
to costing as to other things: we do the costing based on the number
of iterations of the main loop, rather than on the number of iterations
of the epilogue.

FWIW, we don't try to vectorize single-iteration main loops either
(although of course they shouldn't exist in the first place :-)).

Thanks,
Richard

  reply	other threads:[~2020-09-23 11:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18  2:37 [PATCH] vect/test: Don't check for epilogue loop [PR97075] Kewen.Lin
2020-09-18 15:46 ` Segher Boessenkool
2020-09-18 18:17 ` Richard Sandiford
2020-09-20 14:03   ` Kewen.Lin
2020-09-21  6:50     ` Richard Sandiford
2020-09-22  3:23       ` Kewen.Lin
2020-09-21  7:29   ` Andrea Corallo
2020-09-21  8:32     ` Richard Sandiford
2020-09-22 14:34       ` [PATCH] vect: Fix epilogue loop handling of partial vectors Richard Sandiford
2020-09-23  3:07         ` Kewen.Lin
2020-09-23 11:33           ` Richard Sandiford [this message]
2020-09-24  2:35             ` Kewen.Lin
2020-09-23  7:58         ` Richard Biener

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=mpt1risiv6z.fsf@arm.com \
    --to=richard.sandiford@arm.com \
    --cc=andrea.corallo@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=richard.guenther@gmail.com \
    --cc=segher@kernel.crashing.org \
    --cc=wschmidt@linux.ibm.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).