https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125153

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Disabling threadfull2 helps.  We FSM thread the irreducible region, but somehow
end up bypassing an exit:

 Registering killing_def (path_oracle) _4
 Registering value_relation (path_oracle) (prephitmp_24 >= pretmp_27) (root:
bb5)
 Registering killing_def (path_oracle) _4
 folding with relation prephitmp_24 >= pretmp_27
Checking profitability of path (backwards):
  [1] Registering jump thread: (5, 4) incoming edge;  (4, 5) normal (5, 4)
nocopy (back);
path: 5->4->5->4 SUCCESS

but we may not do the last 5->4, not sure why we do that.

The issue is that SSA based analysis, when going in circles, isn't correct.

The testcase added by the change has the new thread

Checking profitability of path (backwards):  bb:3 (2 insns) bb:7 (0 insns)
(latch) bb:5 (3 insns) bb:3
  Control statement insns: 2
  Overall: 3 insns

Checking profitability of path (backwards):
  [2] Registering jump thread: (3, 5) incoming edge;  (5, 7) normal (7, 3)
normal (back) (3, 5) nocopy;
path: 3->5->7->3->5 SUCCESS

where the duplicate threaded test resolves in the same way.

I think the ranger path oracle is simply not set up for duplicate defs,
so I think I have to revert the change.

Reply via email to