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 middle-end/67809] Empty pointer-chasing loops aren't optimized out Date: Fri, 02 Oct 2015 09:29:00 -0000 [thread overview] Message-ID: <bug-67809-4-YfjqkQANdO@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67809-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67809 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- We indeed do not have a flag to tell GCC it's ok to remove infinite loops with no side-effects. We assume the dereferences will not trap (unless -fexceptions -fnon-call-exceptions) and GCC happily removes possible traps so I don't think that would prevent the DCE here. What prevents DCE is that the loop might not terminate. There isn't any "infinite loop is undefined behavior" thing so clang removing the loop is an invalid transform.
next prev parent reply other threads:[~2015-10-02 9:29 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-10-01 20:47 [Bug middle-end/67809] New: " matt at godbolt dot org 2015-10-02 9:29 ` rguenth at gcc dot gnu.org [this message] 2015-10-02 9:52 ` [Bug middle-end/67809] " glisse at gcc dot gnu.org 2021-06-12 12:30 ` gareth@ignition-web.co.uk 2021-08-28 23:52 ` pinskia 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-67809-4-YfjqkQANdO@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).