[PATCH] D99424: [BasicAA] Be more careful with modulo ops on VariableGEPIndex.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 09:58:54 PDT 2021


fhahn created this revision.
fhahn added reviewers: asbirlea, jdoerfert, hfinkel, nikic.
Herald added subscribers: arphaman, hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.

(V * Scale) % X may not produce the same result for any possible value
of V, e.g. if the multiplication overflows. This means we currently
incorrectly determine NoAlias in some cases.

This patch adjusts the code linarizing GEPs to try to track if the
modulo semantics are preserved. There might still be GEPs and cases
where we miss, but it should address a few critical cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99424

Files:
  llvm/include/llvm/Analysis/BasicAliasAnalysis.h
  llvm/lib/Analysis/BasicAliasAnalysis.cpp
  llvm/test/Analysis/BasicAA/gep-alias.ll
  llvm/test/Analysis/BasicAA/gep-modulo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99424.333578.patch
Type: text/x-patch
Size: 10426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210326/04b712c2/attachment.bin>


More information about the llvm-commits mailing list