On Tue, Jan 16, 2007 at 08:22:10AM -0600, Gabriel Dos Reis wrote: > I mean, could not we generate the following for "%": > > rem a b := > if abs(b) == 1 > return 0 > return <machine-instruction> a b
On x86 processors that have conditional moves, why not do the equivalent
of
neg_b = -b;
cmov(last result is negative,neg_b,b)
__machine_rem(a,b)
Then there's no disruption of the pipeline.
