From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Cc: Jakub Jelinek <jakub@redhat.com>, richard.sandiford@arm.com
Subject: Re: [PATCH] middle-end/114070 - VEC_COND_EXPR folding
Date: Sun, 3 Mar 2024 10:02:55 -0700 [thread overview]
Message-ID: <c3fe7220-4794-495a-b90d-38890cb90dfd@gmail.com> (raw)
In-Reply-To: <20240229083505.9ACA41329E@imap2.dmz-prg2.suse.org>
On 2/29/24 01:35, Richard Biener wrote:
> The following amends the PR114070 fix to optimistically allow
> the folding when we cannot expand the current vec_cond using
> vcond_mask and we're still before vector lowering. This leaves
> a small window between vectorization and lowering where we could
> break vec_conds that can be expanded via vcond{,u,eq}, most
> susceptible is the loop unrolling pass which applies VN and thus
> possibly folding to the unrolled body of a vectorized loop.
>
> This gets back the folding for targets that cannot do vectorization.
> It doesn't get back the folding for x86 with AVX512 for example
> since that can handle the original IL but not the folded since
> it misses some vcond_mask expanders.
>
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
>
> As said for stage1 I want to move vector lowering before vectorization.
> While I'm not entirely happy with this patch it forces us into the
> correct direction, getting vcond_mask and vcmp{,u,eq} patterns
> implemented. We could use canonicalize_math_p () to close the
> vectorizer -> vector lowering gap but this only works when that
> pass is run (not with -Og or when disabled). We could add a new
> PROP_vectorizer_il and disable the folding if the vectorizer ran.
>
> Or we could simply live with the regression.
>
> Any preferences?
Not really. As I think I said, I consider the regression insignificant
an I could certainly live with it.
jeff
next prev parent reply other threads:[~2024-03-03 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 8:35 Richard Biener
2024-03-03 17:02 ` Jeff Law [this message]
2024-02-29 10:16 Richard Biener
2024-02-29 10:44 ` Jakub Jelinek
2024-03-01 12:11 ` 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=c3fe7220-4794-495a-b90d-38890cb90dfd@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--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).