public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Richard Biener <rguenther@suse.de>, gcc-patches@gcc.gnu.org
Cc: richard.sandiford@arm.com
Subject: Re: [PATCH] tree-optimization/108724 - vectorized code getting piecewise expanded
Date: Mon, 13 Feb 2023 07:39:28 -0700	[thread overview]
Message-ID: <5abeaa51-b37a-b1c3-ca55-ca5047e6fa8f@gmail.com> (raw)
In-Reply-To: <20230210110247.514FA385B53C@sourceware.org>



On 2/10/23 04:02, Richard Biener via Gcc-patches wrote:
> This fixes an oversight to when removing the hard limits on using
> generic vectors for the vectorizer to enable both SLP and BB
> vectorization to use those.  The vectorizer relies on vector lowering
> to expand plus, minus and negate to bit operations but vector
> lowering has a hard limit on the minimum number of elements per
> work item.  Vectorizer costs for the testcase at hand work out
> to vectorize a loop with just two work items per vector and that
> causes element wise expansion and spilling.
> 
> The fix for now is to re-instantiate the hard limit, matching what
> vector lowering does.  For the future the way to go is to emit the
> lowered sequence directly from the vectorizer instead.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, OK?
> 
> Thanks,
> Richard.
> 
> 	PR tree-optimization/108724
> 	* tree-vect-stmts.cc (vectorizable_operation): Avoid
> 	using word_mode vectors when vector lowering will
> 	decompose them to elementwise operations.
> 
> 	* gcc.target/i386/pr108724.c: New testcase.
OK.  Though can't this be a problem with logicals too?  Or is there 
something special about +- going on here?


jeff

       reply	other threads:[~2023-02-13 14:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230210110247.514FA385B53C@sourceware.org>
2023-02-13 14:39 ` Jeff Law [this message]
2023-02-13 14:51   ` Richard Biener
2023-02-13 16:05     ` Jeff Law
     [not found] <20230210110251.62A5B385B52C@sourceware.org>
2023-02-10 11:18 ` Richard Sandiford
2023-02-10 11:21   ` Richard Biener
2023-02-10 11:02 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=5abeaa51-b37a-b1c3-ca55-ca5047e6fa8f@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --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).