https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125986
Bug ID: 125986
Summary: ranger: incoming relations to a threading path are
ignored
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: aldyh at gcc dot gnu.org
Target Milestone: ---
Created attachment 64851
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64851&action=edit
Instrument DOM threading of pointer statements
I've instrumented DOM to see what threading paths ranger can't resolve
on final conditionals involving pointers, and we seem to be ignoring SSA
relations incoming to a threading candidate.
I have attached the instrumentation patch for easy reproduction. With it, we
ICE on anything DOM gets that ranger cannot. The testcase is
gcc.dg/tree-ssa/ssa-sink-18.c compiled with -O2.
The path is BB52->BB57 and all blocks leading up to it go through:
if (_238 <= prephitmp_374)
goto <bb 58>; [2.75%]
else
goto <bb 52>; [97.25%]
So clearly we know _238 > prephitmp_374. However, the path ranger fails to
resolve:
if (_238 > prephitmp_374)
...for which DOM correctly returns 1.