llvm-project/llvm
David Green 1de1070559 [DAGCombine] Fix alias analysis for unaligned accesses
The alias analysis in DAG Combine looks at the BaseAlign, the Offset and
the Size of two accesses, and determines if they are known to access
different parts of memory by the fact that they are different offsets
from inside that "alignment window". It does not seem to account for
accesses that are not a multiple of the size, and may overflow from one
alignment window into another.

For example in the test case we have a 19byte memset that is splits into
a 16 byte neon store and an unaligned 4 byte store with a 15 byte
offset. This 15byte offset (with a base align of 8) wraps around to the
next alignment windows. When compared to an access that is a 16byte
offset (of the same 4byte size and 8byte basealign), the two accesses
are said not to alias.

I've fixed this here by just ensuring that the offsets are a multiple of
the size, ensuring that they don't overlap by wrapping. Fixes PR45035,
which was exposed by the UseAA changes in the arm backend.

Differential Revision: https://reviews.llvm.org/D75238
2020-02-28 18:44:36 +00:00
..
benchmarks
bindings [LLVM-C] Add bindings for addCoroutinePassesToExtensionPoints 2020-02-24 20:15:51 +01:00
cmake [cmake][msvc] Don't disable C4345 any more. 2020-02-28 13:57:20 +00:00
docs [ADT] Add CoalescingBitVector, implemented using IntervalMap [1/3] 2020-02-27 12:39:46 -08:00
examples [ORC][examples] Fix ThinLtoJIT example after changes in 85fb997659. 2020-02-20 11:15:08 -08:00
include [Inliner] Inlining should honor nobuiltin attributes 2020-02-28 07:34:14 -08:00
lib [DAGCombine] Fix alias analysis for unaligned accesses 2020-02-28 18:44:36 +00:00
projects
resources
runtimes [runtimes] Add umbrella targets for runtimes 2020-02-12 09:46:14 -08:00
test [DAGCombine] Fix alias analysis for unaligned accesses 2020-02-28 18:44:36 +00:00
tools Fix buildbots after c074f5234d. 2020-02-28 16:20:29 +03:00
unittests [CallPromotionUtils] Add missing promotion legality check to tryPromoteCall. 2020-02-28 09:35:09 -08:00
utils [Utils] Make some scripts directly executable 2020-02-28 13:39:54 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore Continue removing llgo. 2020-02-10 10:33:58 -08:00
CMakeLists.txt [AIX] Improve 32/64-bit build configuration 2020-02-20 15:41:00 -05:00
CODE_OWNERS.TXT Remove myself from CODE_OWNERS. 2020-02-25 11:59:29 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.