-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen: Optimize vector ops for X64 when the source is computed (#1174)
With the TAG_VECTOR change, we can now confidently distinguish cases when the .w component contains TVECTOR tag from cases where it doesn't: loads and tag ops produce the tag, whereas other instructions don't. We now take advantage of this fact and only apply vandps with a mask when we need to. It would be possible to use a positive filter (explicitly checking for source coming from ADD_VEC et al), but there are more instructions to check this way and this is purely an optimization so it is allowed to be conservative (as in, the cost of a mistake here is a potential slowdown, not a correctness issue). Additionally, this change only performs vandps once when the arguments are the same instead of doing it twice. On the function that computes a polynomial approximation this change makes it ~20% faster on Zen4.
- Loading branch information
Showing
2 changed files
with
45 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters