public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/79201] missed optimization: sinking doesn't handle calls, swap PRE and sinking
Date: Thu, 06 Jun 2024 11:08:15 +0000 [thread overview]
Message-ID: <bug-79201-4-rzRM834ho1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-79201-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79201
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #6)
> here is a testcase where DOM does not mess with the loop but we should still
> be able to sink the function out and do when adding -fno-tree-pre:
>
> int f(int n, int t) {
> int i,j=0;
> if (t >=31 || t < 0) return 100;
>
> for (i = 0; i < t; i++) {
> j = __builtin_ffs(i);
> }
> return j;
> }
Note in GCC 12+, you need -fno-tree-vectorize to get the bad behavior back.
prev parent reply other threads:[~2024-06-06 11:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-79201-4@http.gcc.gnu.org/bugzilla/>
2021-06-11 10:12 ` drraph at gmail dot com
2021-09-11 7:04 ` pinskia at gcc dot gnu.org
2024-06-06 10:59 ` drraph at gmail dot com
2024-06-06 11:08 ` pinskia at gcc dot gnu.org [this message]
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-79201-4-rzRM834ho1@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).