It is known that having some magical cut-off does just that,
it prevents very large regressions, but is potentially suboptimal
in certain cases.
There has been several reports that the current budget
is just a tad bit too small, and by making SCEV smarter,
e.g. teaching it to handle new IR patterns,
instead of representing them as SCEVUnknown,
makes problem worse.
This current constant, 4, was never meant
to be The One True Value, but rather it seemed like
the right choice at the time.
Currently, we use it for 3 purposes:
- loop exit value rewriting
- loop trip/exit count expansion
- loop invariant expansion
Now, the loop trip/exit count is a special case of
the loop invariant, so let's treat them as one.
Out of the three, loop exit value is the problematic one.
Let's split the budget into two, and bump the loop invariant one.
NFC-regenerate tests? Yes, it' extremely annoying since they've updated this script. :(