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 rtl-optimization/55270] [4.8 Regression] ICE in get_loop_body, at cfgloop.c:823 Date: Mon, 28 Jan 2013 14:03:00 -0000 [thread overview] Message-ID: <bug-55270-4-8bYHMWArK6@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55270-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55270 --- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-28 14:03:18 UTC --- When propagate_rhs_into_lhs alters the CFG from if () { if () exit_loop; } to if () { exit_loop; } it fails to fixup loop structure: /* Propagation into these nodes may make certain edges in the CFG unexecutable. We want to identify them as PHI nodes at the destination of those unexecutable edges may become degenerates. */ else if (gimple_code (use_stmt) == GIMPLE_COND || gimple_code (use_stmt) == GIMPLE_SWITCH || gimple_code (use_stmt) == GIMPLE_GOTO) { ... Now, for full propagation the edge wants marking as non-executable (which is done by removing it here - somewhat premature, as CFG cleanup is run afterwards anyway and that handles the situation correctly by calling fix_loop_structure). Index: gcc/tree-ssa-dom.c =================================================================== --- gcc/tree-ssa-dom.c (revision 195502) +++ gcc/tree-ssa-dom.c (working copy) @@ -3006,7 +3006,14 @@ eliminate_degenerate_phis (void) } if (cfg_altered) - free_dominance_info (CDI_DOMINATORS); + { + free_dominance_info (CDI_DOMINATORS); + if (current_loops) + { + calculate_dominance_info (CDI_DOMINATORS); + fix_loop_structure (NULL); + } + } /* Propagation of const and copies may make some EH edges dead. Purge such edges from the CFG as needed. */ fixes this (one more reason to fix loop structure at loop_optimizer_init instead ...)
next prev parent reply other threads:[~2013-01-28 14:03 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-11 10:25 [Bug rtl-optimization/55270] New: " antoine.balestrat at gmail dot com 2012-11-13 10:20 ` [Bug rtl-optimization/55270] " mpolacek at gcc dot gnu.org 2013-01-26 14:11 ` antoine.balestrat at gmail dot com 2013-01-26 14:28 ` mpolacek at gcc dot gnu.org 2013-01-28 13:34 ` [Bug rtl-optimization/55270] [4.8 Regression] " mpolacek at gcc dot gnu.org 2013-01-28 13:35 ` mpolacek at gcc dot gnu.org 2013-01-28 13:39 ` rguenther at suse dot de 2013-01-28 13:43 ` mpolacek at gcc dot gnu.org 2013-01-28 13:48 ` rguenth at gcc dot gnu.org 2013-01-28 14:03 ` rguenth at gcc dot gnu.org [this message] 2013-01-28 16:43 ` mpolacek at gcc dot gnu.org 2013-01-29 9:01 ` rguenther at suse dot de 2013-01-29 9:39 ` mpolacek at gcc dot gnu.org 2013-01-29 10:40 ` rguenth at gcc dot gnu.org 2013-01-29 11:39 ` 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-55270-4-8bYHMWArK6@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).