https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117088
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |85316
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
CC| |hubicka at gcc dot gnu.org,
| |jamborm at gcc dot gnu.org
Last reconfirmed| |2024-11-29
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. It's also interesting that we lack range info on 'row':
void digits_2.isra (integer(kind=4) ISRA.6607)
{
integer(kind=4) ISRA.6607_927(D) = ISRA.6607;
...
# RANGE [irange] integer(kind=4) [-2147483647, 8][10, +INF]
_494 = ISRA.6607_927(D) + 1;
# USE = nonlocal escaped
# CLB = nonlocal escaped
digits_2.isra (_494); // recursive invocation
only non-recursive invocation:
digits_2.isra (1);
so we at least know row is [1, +INF] since the add is signed.
We might be able to use a SCEV-like range computation for recursive cases like
this, then being able to compute [2, 8] for the recursion invocation. Not
sure whether doing this in local VRP is possible and how much of help symtab
is here (single caller).
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316
[Bug 85316] [meta-bug] VRP range propagation missed cases