[Bug c/88481] -O1 causes optimizer to drop 'then' clause in conditional
heinrich.seebauer at swistec dot de
gcc-bugzilla@gcc.gnu.org
Thu Dec 13 16:56:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88481
--- Comment #8 from Heinrich Seebauer <heinrich.seebauer at swistec dot de> ---
Sorry, my comment was lost completely after uploading the attachment.
Try again...
So I hope, I got this right.
-fdbg-cnt=if_conversion:xx,if_after_combine:yy
xx yy result
-----------------------
20 20 success
20 21 fail
0 21 fail
21 20 fail
tested with -fdbg-cnt=if_conversion:20,if_after_combine:21 -fno-if-conversion
and got functioning code.
I did gdb stepping in the source file where I observed, that the condition was
true, but the branch was not executed. Same with the tests here - they were all
strepped via source code.
More information about the Gcc-bugs
mailing list