diff options
author | Igor Breger <igor.breger@intel.com> | 2016-06-27 06:42:54 +0000 |
---|---|---|
committer | Igor Breger <igor.breger@intel.com> | 2016-06-27 06:42:54 +0000 |
commit | 7357849dca66796b1f5c454cda010e8d2ef55fd6 (patch) | |
tree | 0c4ca53b6ab3e5324f3e0db75e45ae7f8f2bab4e /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | d4492ee15995bd19d0616b3c1051c7846ab01bf7 (diff) | |
download | llvm-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.cpp | 2 |
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; |