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/65335] Potential optimization issue with 'tree-loop-vectorize' Date: Mon, 09 Mar 2015 12:06:00 -0000 [thread overview] Message-ID: <bug-65335-4-1yv5dMsQFF@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65335-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65335 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2015-03-09 CC| |law at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- This is if-conversion at work making the code vectorizable. You can disable it with -fno-tree-loop-if-convert. It's not easy to assess profitablility here (well, locally it should use bb frequencies), as computing a*a*a*a*a always could be a win if vectorizing the rest of the loop compensates for the cost. In this case the optimal thing to do is to turn the loop into a loop nest. Not sure how you'd call this kind of loop transform - sth with unswitching IV-based conditions (it's not exactly splitting in this case). We want for (int j = 0; j < 10000/1000; j++){ int i; for (i = j*1000; i < 999; ++i) buffer[i] = a; a = a * a * a * a * a; buffer[i] = a; } so we can vectorize the inner loop and don't need to evaluate the conditional there.
next prev parent reply other threads:[~2015-03-09 12:06 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-06 16:16 [Bug tree-optimization/65335] New: " anwilli5 at ncsu dot edu 2015-03-09 12:06 ` rguenth at gcc dot gnu.org [this message] 2021-08-21 18:59 ` [Bug tree-optimization/65335] " pinskia at gcc dot gnu.org 2021-08-23 6:44 ` 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-65335-4-1yv5dMsQFF@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).