https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109048
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #8)
> Created attachment 54762 [details]
> heuristic
>
> I am testing this heuristic
FAIL: gcc.dg/tree-ssa/ranger-threader-3.c scan-tree-dump-times ethread
"Register
ing.*jump thread" 1
FAIL: gcc.dg/tree-ssa/ssa-dom-thread-14.c scan-tree-dump-times dom2 "Threaded"
2
is the fallout - both are the same testcase, both can be mitigated by adjusting
the dump to scan for and making sure PROP_loop_opts_done is also provided
for functions without loops.
But it also shows a case where we optimize things significantly later
after the change.
if ((!unsignedp || (!left && methods == OPTAB_WIDEN)))
{
enum optab_methods methods1 = methods;
if (unsignedp)
methods1 = OPTAB_MUST_WIDEN;
expand_binop (left ? lshift_optab : rshift_arith_optab,
unsignedp, methods1);
used to be threaded in early threading but now would be delayed to after
loop opts.