public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/106433] [13 Regression] ICE in vect_transform_loops, at tree-vectorizer.cc:1032
Date: Mon, 06 Feb 2023 11:55:57 +0000	[thread overview]
Message-ID: <bug-106433-4-eoZupJxNSk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106433-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 54413
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54413&action=edit
gcc13-pr106433.patch

Seems in this case the set_const_call happens far later, during the
local-pure-const2 pass very soon before expansion into RTL.
The simd clones are created during late IPA, but the cgraph ordering in this
case is that bar is optimized + expanded first, then its caller foo, then the
simd clones of foo and finally the simd clones of bar.  In order to be able to
DCE unneeded simd clones, that is the intended ordering that we process simd
clones only after processing their (possible) callers, so that if we decide not
to use them and they are static, they can go away.

The big question is if it is safe to make those clones const or pure if the
function they are cloned from is.  I'd hope it is, they are created by the
compiler from the functions they were cloned from and they should be just
possibly vectorized versions thereof handling more than one argument
concurrently.  I can imagine we'd be able to determine during optimizations one
is const and couldn't prove it for the other, but I'd say if it is safe for one
version it ought to be safe for another one too.

  parent reply	other threads:[~2023-02-06 11:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25  8:12 [Bug tree-optimization/106433] New: " asolokha at gmx dot com
2022-07-25  9:46 ` [Bug tree-optimization/106433] " rguenth at gcc dot gnu.org
2022-10-19 10:43 ` rguenth at gcc dot gnu.org
2022-10-26 16:39 ` asolokha at gmx dot com
2022-12-12 11:19 ` rguenth at gcc dot gnu.org
2023-02-06 11:55 ` jakub at gcc dot gnu.org [this message]
2023-02-07  9:34 ` cvs-commit at gcc dot gnu.org
2023-02-07  9:41 ` jakub 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-106433-4-eoZupJxNSk@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).