diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp --- a/llvm/lib/IR/Type.cpp +++ b/llvm/lib/IR/Type.cpp @@ -132,7 +132,8 @@ } unsigned Type::getScalarSizeInBits() const { - return getScalarType()->getPrimitiveSizeInBits(); + // It is safe to assume that the scalar types have a fixed size. + return getScalarType()->getPrimitiveSizeInBits().getFixedSize(); } int Type::getFPMantissaWidth() const {