public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit 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: Tue, 07 Feb 2023 09:34:28 +0000 [thread overview] Message-ID: <bug-106433-4-VDJN7q1zq5@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 #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:cad2412cc84518195fceb2db31e82e6df7e5a2c2 commit r13-5727-gcad2412cc84518195fceb2db31e82e6df7e5a2c2 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Feb 7 10:33:54 2023 +0100 cgraph: Handle simd clones in cgraph_node::set_{const,pure}_flag [PR106433] The following testcase ICEs, because we determine only in late pure const pass that bar is const (the content of the function loses a store to a global var during dse3 and read from it during cddce2) and local-pure-const2 makes it const. The cgraph ordering is that post IPA (in late IPA simd clones are created) bar is processed first, then foo as its caller, then foo.simdclone* and finally bar.simdclone*. Conceptually I think that is the right ordering which allows for static simd clones to be removed. The reason for the ICE is that because bar was marked const, the call to it lost vops before vectorization, and when we in foo.simdclone* try to vectorize the call to bar, we replace it with bar.simdclone* which hasn't been marked const and so needs vops, which we don't add. Now, because the simd clones are created from the same IL, just in a loop with different argument/return value passing, I think generally if the base function is determined to be const or pure, the simd clones should be too, unless e.g. the vectorization causes different optimization decisions, but then still the global memory reads if any shouldn't affect what the function does and global memory stores shouldn't be reachable at runtime. So, the following patch changes set_{const,pure}_flag to mark also simd clones. 2023-02-07 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/106433 * cgraph.cc (set_const_flag_1): Recurse on simd clones too. (cgraph_node::set_pure_flag): Call set_pure_flag_1 on simd clones too. * gcc.c-torture/compile/pr106433.c: New test.
next prev parent reply other threads:[~2023-02-07 9:34 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 2023-02-07 9:34 ` cvs-commit at gcc dot gnu.org [this message] 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-VDJN7q1zq5@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: linkBe 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).