This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/54838] [4.8 Regression] ICE: in merge_latch_edges, at cfgloop.c:678 with -ftracer
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 24 Nov 2012 11:53:19 +0000
- Subject: [Bug middle-end/54838] [4.8 Regression] ICE: in merge_latch_edges, at cfgloop.c:678 with -ftracer
- Auto-submitted: auto-generated
- References: <bug-54838-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54838
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-11-24 11:53:19 UTC ---
So, in .cse1 we have:
ENTRY
|
|
2
|
|
+-------- 4 ----------+
| / \ |
| / \ |
| 6 5 |
| /\ |\ |
| / \ | \ |
| 7 3 | 8 |
| | | | /\ /
+---|----| | / \ /
| --10 9/
| -/
EXIT-/
(3->4 and 9->4 are back edges). Now, in bypass_block, when we're trying to
bypass BB 4, we iterate over BB 4's incoming edges. We skip certain edges
(e.g. complex), then we're iterating over reg_use_table (registers used in
insn). Here we call
set = find_bypass_set (regno, e->src->index);
If set == NULL, we skip to another iteration. But in this case the set is not
NULL, and we end up with this:
Redirecting fallthru edge 3->4 to 6
JUMP-BYPASS: Proved reg 59 in jump_insn 15 equals constant (const_int 1 [0x1])
Bypass edge from 3->4 to 6
Redirecting fallthru edge 9->4 to 5
JUMP-BYPASS: Proved reg 59 in jump_insn 15 equals constant (const_int 3 [0x3])
Bypass edge from 9->4 to 5
but how can be two different constants in one reg? The hash table is:
SET hash table (11 buckets, 3 entries)
Index 0 (hash value 4)
(reg:SI 59 [ D.1735 ]) := (const_int 1 [0x1])
Index 1 (hash value 5)
(reg/v/f:DI 60 [ b ]) := (const_int 0 [0])
Index 2 (hash value 4)
(reg:SI 59 [ D.1735 ]) := (const_int 3 [0x3])
redirect_edge_and_branch_force then redirect edges and BB 4 is gone.
I'd say we cannot redirect edges of BBs which have 2 and more incoming back
edges if in the hash table there are more entries with the same hash values,
but the SRC rtx's differ. I'll post something to ML.