public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/114435] PCOM messes up vectorization some times
Date: Wed, 29 May 2024 10:43:12 +0000	[thread overview]
Message-ID: <bug-114435-4-ihFHcEaMWU@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114435-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114435

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to jchrist from comment #5)
> I tried your patch and it leaves an awful amount of dead stores to the
> accumulator within the loop.  I also still see the stores inside the loop in
> gimple.  Is this really desired?  Or is this an artifact of our unrolling
> setting on s390x?  But even in the gimple I see the store inside the loop.

The main issue is that we cannot do store-motion in the loop during
invariant motion.  I have not checked why.

So the (vector) accumulator update stays in the loop and if you unroll
this say during RTL then you'll see the duplicates.  Note that then
appearantly RTL DSE also cannot remove them (likely due to the same reason,
all memory accesses use alias-set 1).

  parent reply	other threads:[~2024-05-29 10:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 17:17 [Bug tree-optimization/114435] New: Bad code generated when SSA and PCOM are enabled jchrist at linux dot ibm.com
2024-03-25  8:52 ` [Bug tree-optimization/114435] PCOM messes up vectorization some times rguenth at gcc dot gnu.org
2024-05-29  8:03 ` jchrist at linux dot ibm.com
2024-05-29  8:23 ` rguenth at gcc dot gnu.org
2024-05-29  8:34 ` rguenth at gcc dot gnu.org
2024-05-29  9:25 ` jchrist at linux dot ibm.com
2024-05-29 10:43 ` rguenth at gcc dot gnu.org [this message]
2024-05-29 10:55 ` rguenth at gcc dot gnu.org
2024-05-29 10:58 ` cvs-commit at gcc dot gnu.org
2024-05-29 11:07 ` rguenth at gcc dot gnu.org
2024-05-29 11:10 ` rguenth at gcc dot gnu.org

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=bug-114435-4-ihFHcEaMWU@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).