Comparison of primitive type sizes should now be done in bits, not bytes.

This patch converts getPrimitiveSize to getPrimitiveSizeInBits where it is
appropriate to do so (comparison of integer primitive types).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2007-01-08 16:32:00 +00:00
parent ac8cdf79e7
commit abaa8ca433
3 changed files with 14 additions and 12 deletions

View File

@@ -665,8 +665,8 @@ void SROA::ConvertUsesToScalar(Value *Ptr, AllocaInst *NewAI, unsigned Offset) {
LI->getName(), LI);
} else if (LI->getType()->isFloatingPoint()) {
// If needed, truncate the integer to the appropriate size.
if (NV->getType()->getPrimitiveSize() >
LI->getType()->getPrimitiveSize()) {
if (NV->getType()->getPrimitiveSizeInBits() >
LI->getType()->getPrimitiveSizeInBits()) {
switch (LI->getType()->getTypeID()) {
default: assert(0 && "Unknown FP type!");
case Type::FloatTyID: