https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60075
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
So I only see the IL wher IVOPTs replaces the exit test with one based on
'str':
+ unsigned short _3;
+ unsigned short _4;
+ unsigned short _14;
+ unsigned short _15;
+ unsigned short _16;
+ __SIZETYPE__ _21;
+ const <address-space-8> char * _22;
__BB(2,guessed_local(118111600)):
if (len_8(D) != _Literal (uint8_t) 0)
@@ -13,11 +20,12 @@
goto __BB6(guessed(14763950));
__BB(7,guessed_local(105119324)):
+ _21 = (__SIZETYPE__) len_8(D);
+ _22 = str_6(D) + _21;
goto __BB3(precise(134217728));
__BB(3,loop_header(1),guessed_local(955630224)):
str_17 = __PHI (__BB8: str_10, __BB7: str_6(D));
- n_18 = __PHI (__BB8: n_12, __BB7: _Literal (uint8_t) 0);
_1 = __MEM <const <address-space-8> char> (str_17);
if (_1 != _Literal (const <address-space-8> char) 49)
goto __BB4(precise(0));
@@ -29,10 +37,14 @@
__BB(5,guessed_local(955630224)):
str_10 = str_17 + 1u;
- _2 = (int) n_18;
+ _4 = (unsigned short) str_6(D);
+ _3 = -_4;
+ _16 = (unsigned short) str_10;
+ _15 = _3 + _16;
+ _14 = _15 + 65535u;
+ _2 = (int) _14;
buf[_2] ={v} _Literal (unsigned char) 49;
- n_12 = n_18 + _Literal (uint8_t) 1;
- if (len_8(D) > n_12)
+ if (str_10 != _22)
goto __BB8(guessed(119453778));
But this looks sound, so I'm not sure what exactly the problem is to date
(maybe trunk no longer exhibits the original issue)?