David Miller <[EMAIL PROTECTED]> writes: > > Because I've seen gcc optimize this properly before (at least on > sparc64), it means that either: > > 1) There is a GCC bug where the properties of the constants > do not propagate. > > 2) GCC really thinks the divide is cheaper (code density vs. > cycle count tradeoffs etc.)
Probably Eric compiled with the now default CONFIG_CC_OPTIMIZE_FOR_SIZE/-Os. With that gcc decides to use the shorter hardware divide instruction, even though it is significantly slower than an expanded optimized sequence for constant dividend. We've seen this in a few other cases while during performance regression testing between kernels that still used -O2 vs the newer -Os. No good solution found unfortunately. -Andi - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html