https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103202
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |aldyh at gcc dot gnu.org
--- Comment #8 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
The problem here is this thread:
[5] Registering jump thread: (13, 11) incoming edge; (11, 10) nocopy;
BB11 has this:
=========== BB 11 ============
Imports: n_42
Exports: n_42
Relational : (n_45 < n_42)
<bb 11> [local count: 118111614]:
# np_43 = PHI <np_19(13), &buffer_head(4)>
# n_42 = PHI <m_31(13), addr_14(D)(4)>
# m_31 = PHI <0(13), m_16(4)>
n_45 = n_42 + -1;
if (n_42 != 0)
goto <bb 12>; [89.00%]
else
goto <bb 10>; [11.00%]
Because of the ordering of the import bitmap, we solve m_31 first to 0. Then,
when we solve n_42, we think we can use the m_31 in the cache, but the ordering
is wrong.
PHIs must always be done first. We went through a similar exercise to get
relationals right and somehow missed this.