http://llvm.org/bugs/show_bug.cgi?id=12772
Bug #: 12772
Summary: CONCAT_VECTORS expansion creates broken code.
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 8518
--> http://llvm.org/bugs/attachment.cgi?id=8518
patch for this bug. against llvm 3.1-svn
The expansion of CONCAT_VECTORS goes into
SelectionDAGLegalize::ExpandVectorBuildThroughStack(SDNode* Node).
This routine converts the expansion into multiple stores into stack and a load
from the stack.
This correctly stores the first vector into stack but the stack offset of the
second vector is incorrect and the store happens into wrong place, so some
elements of vector end up in wrong place and last element becomes total
garbage.
This is because the stack offset is calculated by the size of the _element_ of
the vector instead of size of the stored data type (size of the _whole_
vector), so it breaks for CONCAT_VECTORS where input types are vectors.
The same routine is used expanding BUILD_VECTOR where it works correctly, as
the inputs of BUILD_VECTOR are always scalars, so the element size is same as
the whole data type size.
--
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