-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
x64: Lower bitcast, fabs, and fneg in ISLE #4729
x64: Lower bitcast, fabs, and fneg in ISLE #4729
Conversation
Subscribe to Label Action
This issue or pull request has been labeled: "cranelift", "cranelift:area:x64", "isle"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+ on new commits here; will approve once we resolve #4722 and rebase this
|
||
(rule (lower (has_type $F32X4 (fneg x))) | ||
(x64_xorps x | ||
(x64_pslld (vector_all_ones $F32X4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder, would it be better to use a VCodeConstant here to get the appropriate MSBs-only-in-each-lane value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that be a savings over the two instructions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly, though looking at xorps
I see the basic SSE version is not reg, reg/mem
but just reg, reg
so it would still be a separate load; one load vs. dependent chain of two 1-cycle ops, the latter likely wins. Anyway it's an unimportant enough question that I don't care too much to investigate further :-)
409dbe1
to
30e2041
Compare
30e2041
to
5537332
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Migrate the
bitcast
,fabs
, andfneg
instructions to ISLE