[Bug debug/90231] ivopts causes <optimized away> iterator in the loop
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 18 15:47:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90231
--- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 47068
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47068&action=edit
gcc10-pr90231.patch
Untested implementation of what I wrote above.
The difference on the testcase at -O2 -g is:
<bb 3> [local count: 955630224]:
# base_17 = PHI <base_7(D)(5), base_13(6)>
# ivtmp.11_20 = PHI <ivtmp.11_5(5), ivtmp.11_6(6)>
- # DEBUG i => NULL
+ # DEBUG i => (int) ((ivtmp.11_20 - (unsigned long) dst_10(D)) /[ex] 4)
# DEBUG base => base_17
# DEBUG BEGIN_STMT
_4 = (void *) ivtmp.11_20;
MEM[base: _4, offset: 0B] = base_17;
# DEBUG BEGIN_STMT
- # DEBUG D#1 => NULL
+ # DEBUG D#1 => (int) ((ivtmp.11_20 - (unsigned long) dst_10(D)) /[ex] 4) + 1
# DEBUG i => D#1
base_13 = base_17 + 15;
# DEBUG i => D#1
and in the debugger I can actually see correct i values.
More information about the Gcc-bugs
mailing list