https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127485
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2026-09-26
Status|RESOLVED |NEW
Resolution|FIXED |---
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
This is not fully fixed.
For my original testcase nothing is registered:
```
Folding statement: diff_4 = x_2(D) - y_3(D);
Not folded
Folding statement: if (diff_4 > 1)
Visiting conditional with predicate: if (diff_4 > 1)
```
For a slightly modified testcase:
```
unsigned fu(unsigned x, unsigned y)
{
unsigned diff = x - y;
if (diff >= 1)
;
else
__builtin_unreachable ();
if (x == y) diff ++ ;
return diff;
}
signed fs(signed x, signed y)
{
signed diff = x - y;
if (diff != 0)
;
else
__builtin_unreachable ();
if (x == y) diff ++ ;
return diff;
}
```
Only == is registered on one edge but != is not registered on the other edge:
```
Folding statement: if (diff_4 != 0)
Registering value_relation (x_2(D) == y_3(D)) on (2->3)
```