https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108757
--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jiu Fu Guo from comment #20)
> Interesting thing:
> the VR is always VR_VARYING, even for the below simple case:
>
> typedef unsigned long INT;
> INT __attribute__ ((noinline)) foo (INT x)
> {
> if (x < 4)
> return 0;
> INT a = x + 18446744073709551612ULL;
> INT b = a >> 2;
> return b + 1;
> }
Yes that is because x does not have a "global" range.
You could try the following testcase:
```
typedef unsigned long INT;
INT __attribute__ ((noinline)) foo (INT x)
{
if (x < 4)
__builtin_unreachable();
INT a = x + 18446744073709551612ULL;
INT b = a >> 2;
return b + 1;
}
```
Which gets a (global) range for x_1(D) during forwprop3:
# RANGE [irange] INT [4, +INF]
INTD.2750 x_1(D) = xD.2751;