-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cranelift: make legalization groups smarter #1745
Comments
There's already something like this: one can actually "chain" legalization groups when creating them, with this exact behavior. So i'd say, feel free to add as many legalization groups that you want, as long as they have a clear usefulness. |
Ok, I think I have a clearer idea now... perhaps the title of this issue should be "make legalization groups clearer"? I added a new
|
The new backend framework doesn't use legalizations as much as the old backend framework. |
I am trying to implement a legalization for
imul.i64x2
that must be a custom legalization function. It needs to have logic to look at the ISA-specific flags to determine what legalization to use; I know, I know, this would be fixed by the new backend, but in the meantime I would like to implement this legalization. I cannot find a good transform group to put this custom legalization in: if I put it inx86_narrow
, the legalization search stops too soon and things likei128
(innarrow
) don't get legalized. If I put it in another transform group, e.g.expand
, I have to addi64x2
as a type the group legalizes, which prevents otheri64x2
operations from being legalized (all of these are currently inx86_narrow
). What can I do?x86_expand
but when I do this I run into conflicts with other operations (e.g.ineg
)narrow
imul
legalizations to my custom functionWould appreciate some help thinking through this, @bnjbvr. CCing @iximeow and @whitequark as well since it could be remotely related to #1743.
The text was updated successfully, but these errors were encountered: