http://llvm.org/bugs/show_bug.cgi?id=2957

           Summary: Change vector_shuffle into a variadic SDNode
           Product: new-bugs
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: new bugs
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


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 :)


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to