------- Comment #64 from mmitchel at gcc dot gnu dot org 2008-12-11 17:37 ------- I agree that the most practical short-term solution is to avoid transforming the loop into a division.
However, I'm also interested in what we think the right long-term solution is. I'm not convinced that our goal should be to preserve the form used by the user; rather, I'm inclined to say that our goal should be to (a) recognize the loop as division, and, (b) generate loops to implement division when profitable. It's reasonable is to say that the form user by the user influences the decision about profitability made in (b). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32044