mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
fail to find dimensions when ElementSize is nullptr
when ScalarEvolution::getElementSize returns nullptr it is safe to early return in ScalarEvolution::findArrayDimensions such that we avoid later problems when we try to divide the terms by ElementSize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d4d04199ac
commit
e741924230
@ -7370,7 +7370,7 @@ void ScalarEvolution::findArrayDimensions(SmallVectorImpl<const SCEV *> &Terms,
|
||||
SmallVectorImpl<const SCEV *> &Sizes,
|
||||
const SCEV *ElementSize) const {
|
||||
|
||||
if (Terms.size() < 1)
|
||||
if (Terms.size() < 1 || !ElementSize)
|
||||
return;
|
||||
|
||||
// Early return when Terms do not contain parameters: we do not delinearize
|
||||
|
Loading…
Reference in New Issue
Block a user