Erkki Ruohtula <eru@tele.nokia.fi> wrote:
] Of course, in most situations all this does not matter much. But I found
] it very surprising that this rather simple code generation task,
] dividing an unsigned 16-bit value by the constant 4, was handled so badly
] by two out of the three C compilers I tried it on. It does not particularly
] inspire one to trust the optimizer of the compiler, if speed matters.
] A bad thing, because it really is much clearer and maintainable to
] write n/4, if that is what you actually mean.

But what kind of compilers were these ?
A lot of compilers for 386 don't care that much about the quality of
the code produced, because the PC market isn't driven by speed !
Most compilers I know of on RISC processors get this kind of division
right.