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/53168] ICE in find_or_generate_expression, at tree-ssa-pre.c:3053 Date: Thu, 03 May 2012 14:18:00 -0000 [thread overview] Message-ID: <bug-53168-4-hOTnhppZoc@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53168-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53168 --- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-03 14:17:32 UTC --- I think it is because of how we do VN lookup / insert during phi_translation. SCCVN does not guarantee availability of its lookup result, thus when such availability is not guaranteed when we translate things we should rather use the non-canonical expression (after all we translate expressions (sic!), not values). What happens is that we have (simplified) if (b) { x_1 = a; } else { if (c) for(;;) { x_2 = a; a = 0; } } and SCCVN value-numbers x_2 to x_1. PRE sees that 'a' is ANTIC_IN in the for (;;) block - but it's not ANTIC_OUT in the if (c) block because it gets cleaned out there as it is translated as x_1 which is not insertable. I think the PRE algorithm does not expect that phi_translate (ANTIC_IN (succ)) will ever return something that is _not_ valid at the ANTIC_OUT position. But our phi-translate implementation happily causes this situation. My suggested change to check validity of the phi_translate result at insert time is a workaround, but it only makes this a missed optimization. This particular case is fixed by not turning the memory reference into a conversion on translation.
next prev parent reply other threads:[~2012-05-03 14:18 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-30 13:43 [Bug c/53168] New: " regehr at cs dot utah.edu 2012-04-30 15:18 ` [Bug tree-optimization/53168] " jakub at gcc dot gnu.org 2012-05-02 10:31 ` rguenth at gcc dot gnu.org 2012-05-02 15:02 ` rguenth at gcc dot gnu.org 2012-05-03 8:32 ` steven at gcc dot gnu.org 2012-05-03 14:18 ` rguenth at gcc dot gnu.org [this message] 2012-05-04 11:31 ` rguenth at gcc dot gnu.org 2012-05-04 11:36 ` 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-53168-4-hOTnhppZoc@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).