[BasicAA] Use GEP as context for computeKnownBits in aliasGEP.
authorFlorian Hahn <flo@fhahn.com>
Thu, 12 Dec 2019 17:10:43 +0000 (17:10 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 12 Dec 2019 17:18:04 +0000 (17:18 +0000)
commitbd12a322d7e0b2541880c00f5551e047e06be982
tree8f9c92635b2348cb1e8219a03e08a047cf4365db
parenta4304f96d6baba92baa9db1eef0ed647f76306f6
[BasicAA] Use GEP as context for computeKnownBits in aliasGEP.

In order to use assumptions, computeKnownBits needs a context
instruction. We can use the GEP, if it is an instruction. We already
pass the assumption cache, but it cannot be used without a context
instruction.

Reviewers: anemet, asbirlea, hfinkel, spatel

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D71264
llvm/lib/Analysis/BasicAliasAnalysis.cpp
llvm/test/Analysis/BasicAA/assume-index-positive.ll [new file with mode: 0644]