https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108360
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The first difference with r13-2048 is during fre3:
@@ -210,7 +210,7 @@ marking outgoing edge 6 -> 1 executable
RPO iteration over 5 blocks visited 5 blocks in total discovering 5 executable
blocks iterating 1.0 times, a block was visited max. 1 times
RPO tracked 25 values available at 18 locations and 25 lattice elements
Replaced (int) _6 with _7 in all uses of _24 = (int) _6;
-gimple_simplified to if (_6 == 0)
+gimple_simplified to if (_22 < 0)
Replaced (short int) _6 with h_23 in all uses of _25 = (short int) _6;
Removing dead stmt _25 = (short int) _6;
Removing dead stmt _24 = (int) _6;
@@ -259,7 +259,7 @@ int main ()
_7 = (int) _6;
# RANGE [irange] short int [-INF, +INF] NONZERO 0x10
h_23 = (short int) _6;
- if (_6 == 0)
+ if (_22 < 0)
goto <bb 3>; [50.00%]
else
goto <bb 4>; [50.00%]
Given:
_3 = _22 >= 0;
_4 = (char) _3;
f.5_5 = (unsigned char) _3;
_6 = f.5_5 << 4;
h_23 = (short int) _6;
and range of f.5_5 being [0, 1] that change is certainly correct.