[DependenceAnalysis] Guard analysis using getPointerBase().
commit5d5b08761f944d5b9822d582378333cc4b36a0a7
authorEli Friedman <efriedma@quicinc.com>
Thu, 15 Jul 2021 20:49:13 +0000 (15 13:49 -0700)
committerEli Friedman <efriedma@quicinc.com>
Thu, 15 Jul 2021 21:57:32 +0000 (15 14:57 -0700)
treee1079e19240ff2e12fd657e7c8cfdc76443837d4
parenta8ad9170543906fc58336ab736a109fb42082fbf
[DependenceAnalysis] Guard analysis using getPointerBase().

D104806 broke some uses of getMinusSCEV() in DependenceAnalysis:
subtraction with different pointer bases returns a SCEVCouldNotCompute.
Make sure we avoid cases involving such subtractions.

Differential Revision: https://reviews.llvm.org/D106099
llvm/lib/Analysis/DependenceAnalysis.cpp
llvm/test/Analysis/DependenceAnalysis/lcssa.ll [new file with mode: 0644]