[LLVMbugs] [Bug 2957] New: Change vector_shuffle into a variadic SDNode

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Oct 27 08:06:39 PDT 2008


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: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu


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.



More information about the llvm-bugs mailing list