diff options
author | dim <dim@FreeBSD.org> | 2015-06-09 19:06:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-06-09 19:06:30 +0000 |
commit | 9b27354f6f3e9086d5f7abbc373b617209fc35b2 (patch) | |
tree | 1dc5e75ab222a9ead44c699eceafab7a6ca7b310 /lib/Transforms/Utils/LoopUtils.cpp | |
parent | 782067d0278612ee75d024b9b135c221c327e9e8 (diff) | |
download | FreeBSD-src-9b27354f6f3e9086d5f7abbc373b617209fc35b2.zip FreeBSD-src-9b27354f6f3e9086d5f7abbc373b617209fc35b2.tar.gz |
Vendor import of llvm trunk r239412:
https://llvm.org/svn/llvm-project/llvm/trunk@239412
Diffstat (limited to 'lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | lib/Transforms/Utils/LoopUtils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/LoopUtils.cpp b/lib/Transforms/Utils/LoopUtils.cpp index a5890c0..5f25e6b 100644 --- a/lib/Transforms/Utils/LoopUtils.cpp +++ b/lib/Transforms/Utils/LoopUtils.cpp @@ -491,6 +491,9 @@ bool llvm::isInductionPHI(PHINode *Phi, ScalarEvolution *SE, const DataLayout &DL = Phi->getModule()->getDataLayout(); int64_t Size = static_cast<int64_t>(DL.getTypeAllocSize(PointerElementType)); + if (!Size) + return false; + int64_t CVSize = CV->getSExtValue(); if (CVSize % Size) return false; |