------- Additional Comments From falk at debian dot org 2005-02-27 11:23 ------- Here's a paper about this if anybody wants to do this systematically:
Saman Amarasinghe, Walter Lee, Ben Greenwald. Strength Reduction of Integer Division and Modulo Operations LCPC 2001 http://www.lcs.mit.edu/publications/pubs/pdf/MIT-LCS-TM-600.pdf -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20231