------- Comment #42 from amylaar at gcc dot gnu dot org 2008-12-10 04:29 ------- (In reply to comment #25) > Created an attachment (id=14637) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14637&action=view) [edit] > Patch to make ivopts take autoincrement addressing modes into account > > Ivopts take autoincrement addressing modes into account with this patch (in a > fairly simplistic form, sufficient to improve the code for the testcases in > this PR). However, I do not have access to any architecture where I could > test > it (I somewhat suspect it might cause performance regressions -- using > autoincrement addressing modes is not necessarily always profitable). >
AFAICS this does not take any AUTO_INC modes but POST_INC into account. When you have PRE_MODIFY and POST_MODIFY, most or all iv increments become free if there is a memory access using them. Also, if you are not sure yet of the merit of the patch, it would be best to make its effect an option, so that it can be easily benchmarked. And if it turns out to be good for some targets but bad for others, we can keep it an option which gets defaulted appropriately by OPTIMIZATION_OPTIONS. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31849