From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31514 invoked by alias); 17 Dec 2013 21:14:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31389 invoked by uid 48); 17 Dec 2013 21:14:00 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/58668] [4.8/4.9 regression] internal compiler error: in cond_exec_process_insns, at ifcvt.c:339 Date: Tue, 17 Dec 2013 21:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg01574.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58668 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu.org --- Comment #5 from Jakub Jelinek --- I think the problem is that ifcvt relies on consistent counting of insns, but the various functions count different things. - count_bb_insns counts CALL_INSN and INSN - flow_find_cross_jump counts in some cases the jump insn (quite complicated test whether it counts it or not), and doesn't count insns with USE or CLOBBER PATTERNs - flow_find_head_matching_sequence counts all CALL_INSN/INSN, including USE and CLOBBER - first_active_insn finds what count_bb_insns counts - last_active_insn (..., TRUE) finds what count_bb_insns except it skips over USE patterns I guess best would be to count/skip/etc. the same things consistently, the problem is that some of the functions have other uses etc. So, perhaps 1) let count_bb_insns not count insns with USE or CLOBBER PATTERNs 2) perhaps not count any JUMP_INSNs in flow_find_cross_jump if dir_p == NULL (i.e. when called from ifcvt)? 3) perhaps not count USE/CLOBBER insns in flow_find_head_matching_sequence if stop_after is non-zero? 4) perhaps add also skip_use argument to first_active_insn and if TRUE, ignore USE insns and for both {first,last}_active_insn if skip_use is TRUE, also ignore CLOBBER insns 5) in find_active_insn_{before,after} ignore USE/CLOBBER insns and document this properly?