[BasicAA] Fix aliasGEP/DecomposeGEPExpression for scalable type.
authorHuihui Zhang <huihuiz@quicinc.com>
Fri, 10 Apr 2020 23:24:18 +0000 (16:24 -0700)
committerHuihui Zhang <huihuiz@quicinc.com>
Fri, 10 Apr 2020 23:58:26 +0000 (16:58 -0700)
commit6c989d024862f1d0a7a7f700f94adcbab76489a2
treee4331358c4d4f5fa6066e03604715c54b1094508
parentf78fcd6906a032bf5feb0e60c9e8991bf31e990e
[BasicAA] Fix aliasGEP/DecomposeGEPExpression for scalable type.

Summary:
Don't attempt to analyze the decomposed GEP for scalable type.
GEP index scale is not compile-time constant for scalable type.
Be conservative, return MayAlias.

Explicitly call TypeSize::getFixedSize() to assert on places where
scalable type doesn't make sense.

Add unit tests to check functionality of -basicaa for scalable type.

This patch is needed for D76944.

Reviewers: sdesmalen, efriedma, spatel, bjope, ctetreau

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77828
llvm/include/llvm/Analysis/BasicAliasAnalysis.h
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/vscale.ll [new file with mode: 0644]