PATCH COMMITTED: Use conditional moves in groups of assignments
Richard Guenther
richard.guenther@gmail.com
Sun Jan 15 20:24:00 GMT 2006
On 15 Jan 2006 10:56:14 -0800, Ian Lance Taylor <ian@airs.com> wrote:
> Richard Guenther <richard.guenther@gmail.com> writes:
>
> > > This avoids the conditional branch and will generally be more
> > > efficient.
> >
> > Actually the P4 is horribly slow with conditional moves.
>
> Would it be appropriate for i386.h to define MAX_CONDITIONAL_EXECUTE?
Probably. But it should be decided taking into account branch
probabilities if possible. I.e. a well-predicted jump will be as fast
as a cmov, only in the case of random execution the (multiple)
cmov will pay off always.
Richard.
More information about the Gcc-patches
mailing list