[LLVMbugs] [Bug 762] NEW: TargetData needs to be able to specify alignment of vector data types

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon May 1 21:10:34 PDT 2006


           Summary: TargetData needs to be able to specify alignment of
                    vector data types
           Product: libraries
           Version: 1.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Target Description Classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sabre at nondot.org

Currently, with this patch:

TargetData assumes that the required alignment of any vector type is the same as its size.  This is 
completely broken.  On PPC/X86 for example, this is true for 16-byte vectors of supported element 
type, but is wrong for all others, and thus breaks generic vector support.

It would be better for TargetData to have a list of "supported" vector types.  For example, the X86 
target could use:

TD->addPackedTypeInfo(PackedType::get(Type::IntTy, 4), 16);

... to say that that packed type requires 16-byte alignment.  When TargetData is queried about the 
alignment of a given packed type, it should follow the same decomposition algorithm the code 
generator does when given a vector type.  In particular, the alignment of any unsupported packed type 
is the same as the alignment of its element.

This depends on Bug 759 and Bug 761.


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list