[llvm-commits] PATCH: CONCAT_VECTORS expansion through the stack generated incorrect stack offsets, causing broken code to be generated

Heikki Kultala hkultala at cs.tut.fi
Thu May 3 06:24:40 PDT 2012


The expansion of CONCAT_VECTORS goes into
SelectionDAGLegalize::ExpandVectorBuildThroughStack(SDNode* Node).

The routine calculated the offsets of the stores from the size of the 
element size of the result vector. This works when the routine is used 
to expand BUILD_VECTOR of scalars, but it works incorrectly for 
CONCAT_VECTORS where one operand has bigger size than single element of 
the result vector.

This patch fixes the store offsets to be calculated by the size of the 
input operands instead of the size of the elements in the result vectors.



I hope this patch makes it into llvm 3.1 as this bug causes broken code 
to be generated on our code(tce).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: concat_vectors_expand_fix.patch
Type: text/x-patch
Size: 1029 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120503/949dd832/attachment.bin>


More information about the llvm-commits mailing list