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] Could commute some VEX encoded instructions to enable 2 byte VEX prefix #36054

Closed
topperc opened this issue Mar 13, 2018 · 2 comments
Closed
Labels
backend:X86 bugzilla Issues migrated from bugzilla

Comments

@topperc
Copy link
Collaborator

topperc commented Mar 13, 2018

Bugzilla Link 36706
Resolution FIXED
Resolved on Nov 08, 2019 10:01
Version trunk
OS All
Blocks #26673
CC @RKSimon
Fixed by commit(s) f65493a

Extended Description

The VEX prefix comes in two forms, 2 byte and 3 byte. The 2 byte version is missing some fields from the 3 byte version so can't encode all instructions.

The missing fields are VEX.W, VEX.mmmmm, VEX.X, and VEX.B. VEX.X is only used by memory instructions. VEX.W isn't used on most instructions.

For a commutable instructions like the register only form of VPADDD, if one input is xmm8-15 and the other is xmm0-7, we could take advantage of commuting to always put the xmm8-15 in the operand that uses VEX.R to avoid needing VEX.B.

This would only work for instructions that use VEX.mmmmm = 0x1, but that's the more common encoding for that field.

@topperc
Copy link
Collaborator Author

topperc commented Oct 6, 2019

Candidate patch https://reviews.llvm.org/D68550

@topperc
Copy link
Collaborator Author

topperc commented Nov 8, 2019

Fixed in f65493a

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant