Make getTypeSizeInBits work correctly for array types; it should return
authorDan Gohman <gohman@apple.com>
Wed, 24 Feb 2010 22:05:23 +0000 (22:05 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 24 Feb 2010 22:05:23 +0000 (22:05 +0000)
commitc382bc3c0f476bf94303d9892af4e2cee173bfe5
tree177ed972f2efd65c0f0296b1899e97042128a4cb
parent46ca5efdd5b748ba8aa62168f7753cb46b683bc5
Make getTypeSizeInBits work correctly for array types; it should return
the number of value bits, not the number of bits of allocation for in-memory
storage.

Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and
vectors.

Fix several places in CodeGen which compute offsets into in-memory vectors
to use TargetData information.

This fixes PR1784.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97064 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetData.h
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/Target/TargetData.cpp
test/CodeGen/X86/vector-of-i1.ll [new file with mode: 0644]