[all-commits] [llvm/llvm-project] 665060: [BasicAA] Remove misleading overflow check
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed Oct 27 11:56:21 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 665060ea4583fa1773a900d81b71c489aaf3e8e4
https://github.com/llvm/llvm-project/commit/665060ea4583fa1773a900d81b71c489aaf3e8e4
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-10-27 (Wed, 27 Oct 2021)
Changed paths:
M llvm/lib/Analysis/BasicAliasAnalysis.cpp
Log Message:
-----------
[BasicAA] Remove misleading overflow check
GEP decomposition currently checks whether the multiplication of
the linear expression offset and GEP scale overflows. However, if
everything else works correctly, this overflow check is both
unnecessary and dangerously misleading. While it will avoid an
overflow in Scale * Offset in particular, other parts of the
calculation (including those on dynamic values) may still overflow.
The code working on the decomposed GEPs is responsible for ensuring
that it remains correct in the presence of overflow. D112611 fixes
the last issue of that kind that I'm aware of (in fact, the overflow
check was originally introduced to work around precisely that issue).
Differential Revision: https://reviews.llvm.org/D112618
More information about the All-commits
mailing list