Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional move #1

Open
paulie-g opened this issue Jul 15, 2015 · 0 comments
Open

Conditional move #1

paulie-g opened this issue Jul 15, 2015 · 0 comments

Comments

@paulie-g
Copy link

Since the comments on the blog post are closed, I'll say it here:

The standard way to elicit a cmov is the ternary operator. This is vastly preferable to doing inline asm (unless you're doing the whole thing in it) since you're allowing the compiler to reason about scheduling across a wider domain.

With that said, replacing a control dependency with a data dependency in the presence of speculative execution isn't a win as often as one would intuit, especially if your intuition was formed by coding in asm on much earlier microarchs as mine was.

-p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant