[PATCH] D109746: [AA] Teach BasicAA to recognize basic GEP range information.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 26 13:57:40 PDT 2021
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:1231
+ if (!R.isFullSet() && !R.isEmptySet()) {
+ VarIndexRange = R.sextOrTrunc(Var.Scale.getBitWidth())
+ .multiply(ConstantRange(Var.Scale));
----------------
The Var represents a `zext(sext(V)) * Scale`, so this `sextOrTrunc` isn't right if ZExtBits is non-zero. We first need an (optional) sext and then an (optional) zext.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109746/new/
https://reviews.llvm.org/D109746
More information about the llvm-commits
mailing list