2 ms·
While that post is technically correct (conditional moves have high latency because you can't dispatch the instruction until the conditional variable has been e
by wyager 9y ago
While that post is technically correct (conditional moves have high latency because you can't dispatch the instruction until the conditional variable has been evaluated), they're still good in many cases because there's also no immediate dependency on the output of the conditional move. You might end up with 10 conditional moves in your reservation stations, but that's fine if all you're doing is summing up the results. You don't actually act on that sum until the end of your loop, so it's OK if it takes a few cycles after the loop to flush all those pending conditional moves out of the reservation stations.
- jnordwick 9y agoCmov is 1 cycle latency now. Cant remember when there change occurred but AF's info should point the way.
- Veedrac 9y agoThe issue isn't the `cmov` itself, which is extremely forgiving nowadays (4 per cycle!), but the fact the `cmov` introduces a dependency on both inputs and the condition. A predicted branch introduces a dependency on only the predicted input: the other input is never calculated and the condition is checked after-the-fact.