summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/SROA.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-15 09:26:06 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-15 09:26:06 +0000
commit19820053fe46dbc91c43edb80a693fa6aae09251 (patch)
treed39d2db08e15efd61dfcb1759f31f75f2f6a1bd6 /lib/Transforms/Scalar/SROA.cpp
parent5db4bceb47e8db48522ecd94fcfd7747451157bd (diff)
downloadllvm-19820053fe46dbc91c43edb80a693fa6aae09251.tar.gz
llvm-19820053fe46dbc91c43edb80a693fa6aae09251.tar.bz2
llvm-19820053fe46dbc91c43edb80a693fa6aae09251.tar.xz
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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp
index 1c220ca0f6..c65ac5a647 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,