[llvm] r209837 - fail to find dimensions when ElementSize is nullptr
David Blaikie
dblaikie at gmail.com
Thu May 29 12:58:49 PDT 2014
On Thu, May 29, 2014 at 12:44 PM, Sebastian Pop <spop at codeaurora.org> wrote:
> Author: spop
> Date: Thu May 29 14:44:05 2014
> New Revision: 209837
>
> URL: http://llvm.org/viewvc/llvm-project?rev=209837&view=rev
> Log:
> 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.
Test case?
>
> Modified:
> llvm/trunk/lib/Analysis/ScalarEvolution.cpp
>
> Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=209837&r1=209836&r2=209837&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
> +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Thu May 29 14:44:05 2014
> @@ -7370,7 +7370,7 @@ void ScalarEvolution::findArrayDimension
> 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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list