Emit conditonal move: cmov vs movMMcc

Segher Boessenkool segher@kernel.crashing.org
Tue May 12 12:21:02 GMT 2020


On Mon, May 11, 2020 at 02:38:10PM +0100, Maxim Blinov via Gcc-help wrote:
> So i was playing around with adding an intel-like cmov insn to a gcc
> 7.5 based backend. syntax is
> cmov %a,%b,%c,%d
> semantics is
> a = (%b ? %c : %d)
> Now I am aware of two predefined rtl insns for this purpose (from optabs.def):
> mov$acc
> cmov$a6
> my question is, what are the differences, and in what context is one
> selected over the other?

cmov<mode>6 is never generated, but mov<mode>cc is.  The former isn't
documented either, but the latter is.

It looks like cmov<nmode>6 is just historical?  Or even was *never* used?


More information about the Gcc-help mailing list