------- Comment #11 from rakdver at kam dot mff dot cuni dot cz 2010-02-09 08:30 ------- Subject: Re: [4.3/4.4/4.5 Regression] No loop counter reversal for simple loops anymore
Hi, > As suggested by Zdenek, here is a patch that lowers the cost of the IV when > it is compared against zero in a condition. The fragile part of this patch is > that it > lowers the cost by a magical constant "10". Would there be a more appropriate > way to compute the effect, or a better constant? 10 looks like way too much, forcing ivopts to prefer comparison with zero even if other choice of induction variables would be better. The constant should be target-dependent; but unless we already have this information somewhere, I would use 1, or even just change the complexity part of the cost (assuming that that would work), Zdenek -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40886