summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit067edd342f2dbf10d7d8c36a543daa3411ef3679 (patch)
tree79af8c2ca376584a458b97fbf0fa89aaff07a6e6 /llvm/lib
parent7a28f95419a04eb9bc2ab07584485fd979d4eb4d (diff)
downloadbcm5719-llvm-067edd342f2dbf10d7d8c36a543daa3411ef3679.tar.gz
bcm5719-llvm-067edd342f2dbf10d7d8c36a543daa3411ef3679.zip
Relax an overly aggressive assert to fix PR14572.
The alloca width is based on the alloc size, not the type size. llvm-svn: 170270
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/SROA.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index 1c220ca0f6e..c65ac5a647a 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/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,
OpenPOWER on IntegriCloud