diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-12-15 09:26:06 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-12-15 09:26:06 +0000 |
commit | 19820053fe46dbc91c43edb80a693fa6aae09251 (patch) | |
tree | d39d2db08e15efd61dfcb1759f31f75f2f6a1bd6 /lib/Transforms/Scalar/SROA.cpp | |
parent | 5db4bceb47e8db48522ecd94fcfd7747451157bd (diff) | |
download | external_llvm-19820053fe46dbc91c43edb80a693fa6aae09251.zip external_llvm-19820053fe46dbc91c43edb80a693fa6aae09251.tar.gz external_llvm-19820053fe46dbc91c43edb80a693fa6aae09251.tar.bz2 |
Relax an overly aggressive assert to fix PR14572.
The alloca width is based on the alloc size, not the type size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SROA.cpp')
-rw-r--r-- | lib/Transforms/Scalar/SROA.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp index 1c220ca..c65ac5a 100644 --- a/lib/Transforms/Scalar/SROA.cpp +++ b/lib/Transforms/Scalar/SROA.cpp @@ -2607,7 +2607,7 @@ private: TD.getTypeStoreSizeInBits(V->getType()) && "Non-byte-multiple bit width"); assert(V->getType()->getIntegerBitWidth() == - TD.getTypeSizeInBits(OldAI.getAllocatedType()) && + TD.getTypeAllocSizeInBits(OldAI.getAllocatedType()) && "Only alloca-wide stores can be split and recomposed"); IntegerType *NarrowTy = Type::getIntNTy(SI.getContext(), Size * 8); V = extractInteger(TD, IRB, V, NarrowTy, BeginOffset, |