Skip to content

Draft: Add a cmov# primop

Andreas Klebinger requested to merge wip/andreask/cmov-primop into master
Add a cmov# primop

The cmov# primop allows users to force GHC to emit a conditional move
instead of a branch if so desired.

This MR only adds the translation to actual cmov for x86. It's still compiled to branches on other backends.

Things to do before a full merge:

  • Add cmov support to the llvm backend
  • Add support in the arch backend or at least open a ticket to add support.
  • Changelog/Improved docs perhaps too.
Edited by Andreas Klebinger

Merge request reports