[Bug target/62025] [4.9/4.10 Regression] Miscompilation of openssl sha512.c
amker at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 12 10:38:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62025
--- Comment #12 from amker at gcc dot gnu.org ---
Hi,
I can reproduce the exact mis-scheduled instruction issue as in Jakub's comment
with/without the ivopt patch (204497). Turns out gcc chooses candidate like
{&K512, 128}_loop with the patch while candidate {&K512[16], 128}_loop without
the patch. This is caused by candidate cost change. As far as I can see, both
candidate are good for the iv use and shouldn't generate wrong code either.
The interesting thing is, mis-scheduled instruction is the only code difference
(apart from some offset difference as base of candidates are different) caused
by ivopt patch. Normally middle-end patch should have larger impact on
generated code if there is. I will have a look why different iv candidate can
result in one instruction mis-scheduled. Maybe it's useful for investigation.
Anyway, I think 204497 is generally fine in this case.
Thanks,
bin
More information about the Gcc-bugs
mailing list