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
Change vector_shuffle into a variadic SDNode #3329
Comments
Would it be better to introduce a ShuffleSDNode that kept the shuffle mask as an array of integers? |
In any case, either solution would be dramatically better than the current shuffle with buildvector as mask! |
Lots of places want to examine masks to see if they have special |
woohoo |
Make "process attach -c" work correctly, and add a test for it.
Extended Description
Currently codegen represents a vector_shuffle
as a node with three operands. The third operand
is a mask, which must be a BUILD_VECTOR node of
constant integers (a different kind of node that
produces a result of the right vector type isn't
good enough). This causes problems during type
legalization because it is not always possible to
create a legal BUILD_VECTOR usable as the vector
shuffle mask. (LegalizeDAG ignores the legality
or not of the mask argument, but LegalizeTypes
insists on legalizing the types of all nodes,
which I think is the right thing to do).
I think the best plan is to incorporate the mask
directly into the vector shuffle node, by turning
into a node with 2+N operands: the first two the
same as now, followed by the N mask elements.
This seems fairly straightforward to do, but involves
a lot of tedious work. I don't have time for it right
now so I've opened this PR in the hope that someone
else will take it on :)
The text was updated successfully, but these errors were encountered: