diff options
author | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-02-05 09:15:37 +0000 |
---|---|---|
committer | Michael Kuperstein <michael.m.kuperstein@intel.com> | 2015-02-05 09:15:37 +0000 |
commit | d2b6fdbc319b753a63c20d3e4512652835f2ee6d (patch) | |
tree | 23eadd3202642c0a99954aef633274b0b2813033 /llvm/lib | |
parent | 0857a1da0c17e869568eb4456fbc6b39d1794823 (diff) | |
download | bcm5719-llvm-d2b6fdbc319b753a63c20d3e4512652835f2ee6d.tar.gz bcm5719-llvm-d2b6fdbc319b753a63c20d3e4512652835f2ee6d.zip |
Teach isDereferenceablePointer() to look through bitcast constant expressions.
This fixes a LICM regression due to the new load+store pair canonicalization.
Differential Revision: http://reviews.llvm.org/D7411
llvm-svn: 228284
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/IR/Value.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp index 5f7e258441a..52dcd6311ff 100644 --- a/llvm/lib/IR/Value.cpp +++ b/llvm/lib/IR/Value.cpp @@ -496,7 +496,7 @@ static bool isDereferenceablePointer(const Value *V, const DataLayout *DL, // is at least as large as for the resulting pointer type, then // we can look through the bitcast. if (DL) - if (const BitCastInst* BC = dyn_cast<BitCastInst>(V)) { + if (const BitCastOperator *BC = dyn_cast<BitCastOperator>(V)) { Type *STy = BC->getSrcTy()->getPointerElementType(), *DTy = BC->getDestTy()->getPointerElementType(); if (STy->isSized() && DTy->isSized() && |