aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ConstantFolding.cpp
diff options
context:
space:
mode:
authorIgor Breger <igor.breger@intel.com>2016-06-27 06:42:54 +0000
committerIgor Breger <igor.breger@intel.com>2016-06-27 06:42:54 +0000
commit7357849dca66796b1f5c454cda010e8d2ef55fd6 (patch)
tree0c4ca53b6ab3e5324f3e0db75e45ae7f8f2bab4e /llvm/lib/Analysis/ConstantFolding.cpp
parentd4492ee15995bd19d0616b3c1051c7846ab01bf7 (diff)
downloadllvm-7357849dca66796b1f5c454cda010e8d2ef55fd6.zip
llvm-7357849dca66796b1f5c454cda010e8d2ef55fd6.tar.gz
llvm-7357849dca66796b1f5c454cda010e8d2ef55fd6.tar.bz2
[ConstantFolding] Fix bitcast vector of i1.
Differential Revision: http://reviews.llvm.org/D21735 llvm-svn: 273845
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r--llvm/lib/Analysis/ConstantFolding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 5bf5539..0a9d725 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -81,7 +81,7 @@ Constant *FoldBitCast(Constant *C, Type *DestTy, const DataLayout &DL) {
// Now that we know that the input value is a vector of integers, just shift
// and insert them into our result.
- unsigned BitShift = DL.getTypeAllocSizeInBits(SrcEltTy);
+ unsigned BitShift = DL.getTypeSizeInBits(SrcEltTy);
APInt Result(IT->getBitWidth(), 0);
for (unsigned i = 0; i != NumSrcElts; ++i) {
Constant *Element;