OSDN Git Service

Fix BasicAA incorrect assumption on GEP
authorMehdi Amini <mehdi.amini@apple.com>
Fri, 27 Jan 2017 16:12:22 +0000 (16:12 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Fri, 27 Jan 2017 16:12:22 +0000 (16:12 +0000)
commit1726fc698ccb85fe4bb23c200a50f28b57fc53cb
tree590f2b7d27f91ee21fff4c91b5d08a3745b39348
parentc05c9db364b67ff45a3202a75e7d9498024bf66e
Fix BasicAA incorrect assumption on GEP

This is fixing pr31761: BasicAA is deducing NoAlias
on the result of the GEP if the base pointer is itself NoAlias.

This is possible only if the NoAlias on the base pointer is
deduced with a non-sized query: this should guarantee that
the pointers are belonging to different memory allocation
and that the GEP can't legally jump from one to another.

Differential Revision: https://reviews.llvm.org/D29216

llvm-svn: 293293
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/pr31761.ll [new file with mode: 0644]