Skip to content

Instantly share code, notes, and snippets.

@duarten
Last active December 16, 2015 17:19
Show Gist options
  • Save duarten/5469837 to your computer and use it in GitHub Desktop.
Save duarten/5469837 to your computer and use it in GitHub Desktop.
Conditionals without control flow instructions.
int conditional(int x, int y, int z) {
int nx = !x - 1;
return (nx & y) | (~nx & z);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment