Fix a miscompile introduced by 99203f2.
authorRichard Smith <richard@metafoo.co.uk>
Thu, 25 Mar 2021 23:51:56 +0000 (16:51 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Thu, 25 Mar 2021 23:53:58 +0000 (16:53 -0700)
commit040c60d9b69e2ad570556f255a746929a4b10e82
tree4a7211c516b6c4ca0478dad320dd35de10d18aeb
parentcf62b6d3b223a1125576eb24c3c14c7d587941d1
Fix a miscompile introduced by 99203f2.

getPointersDiff would previously round down the difference between two
pointers to a multiple of the element size of the pointee, which could
result in a pointer value being decreased a little.

Alexey Bataev has graciously agreed to add a testcase for this;
submitting the bugfix now to unblock.
llvm/lib/Analysis/LoopAccessAnalysis.cpp