From a931043751d62613cff21d7eea760e17669bef4f Mon Sep 17 00:00:00 2001 From: dim <dim@FreeBSD.org> Date: Sun, 23 Dec 2012 13:04:00 +0000 Subject: Upgrade our copy of llvm/clang to 3.2 release. Release notes for llvm: http://llvm.org/releases/3.2/docs/ReleaseNotes.html Release notes for clang: http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html MFC after: 2 weeks --- contrib/llvm/lib/Transforms/Scalar/SROA.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'contrib/llvm/lib/Transforms') diff --git a/contrib/llvm/lib/Transforms/Scalar/SROA.cpp b/contrib/llvm/lib/Transforms/Scalar/SROA.cpp index 959b4e7..640ea31 100644 --- a/contrib/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/contrib/llvm/lib/Transforms/Scalar/SROA.cpp @@ -2160,6 +2160,9 @@ static bool isIntegerWideningViable(const DataLayout &TD, AllocaPartitioning::const_use_iterator I, AllocaPartitioning::const_use_iterator E) { uint64_t SizeInBits = TD.getTypeSizeInBits(AllocaTy); + // Don't create integer types larger than the maximum bitwidth. + if (SizeInBits > IntegerType::MAX_INT_BITS) + return false; // Don't try to handle allocas with bit-padding. if (SizeInBits != TD.getTypeStoreSizeInBits(AllocaTy)) @@ -2198,7 +2201,7 @@ static bool isIntegerWideningViable(const DataLayout &TD, if (RelBegin == 0 && RelEnd == Size) WholeAllocaOp = true; if (IntegerType *ITy = dyn_cast<IntegerType>(LI->getType())) { - if (ITy->getBitWidth() < TD.getTypeStoreSize(ITy)) + if (ITy->getBitWidth() < TD.getTypeStoreSizeInBits(ITy)) return false; continue; } @@ -2214,7 +2217,7 @@ static bool isIntegerWideningViable(const DataLayout &TD, if (RelBegin == 0 && RelEnd == Size) WholeAllocaOp = true; if (IntegerType *ITy = dyn_cast<IntegerType>(ValueTy)) { - if (ITy->getBitWidth() < TD.getTypeStoreSize(ITy)) + if (ITy->getBitWidth() < TD.getTypeStoreSizeInBits(ITy)) return false; continue; } -- cgit v1.1