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

x86 lowering: use XOR instead of MOV 0 in division #582

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

vbgl
Copy link
Member

@vbgl vbgl commented Sep 22, 2023

There seem to be no good reason not to use “xor edx, edx” to set the highest word to zero. The encoding is shorter and flags are obliterated by the following DIV instruction.

There seem to be no good reason not to use “xor edx, edx” to set the
highest word to zero. The encoding is shorter and flags are obliterated
by the following DIV instruction.
@vbgl vbgl added the lowering label Sep 22, 2023
@bgregoir bgregoir merged commit 47cdf1e into main Sep 25, 2023
1 check passed
@bgregoir bgregoir deleted the x86-lower-udiv-xor branch September 25, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants