llvm-project/llvm/lib
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
..
Analysis [Inliner] Inlining should honor nobuiltin attributes 2020-02-28 07:34:14 -08:00
AsmParser Allow "callbr" to return non-void values 2020-02-24 18:29:06 -08:00
BinaryFormat [MachO] Add cpu(sub)type tests and improve error handling 2020-02-24 10:44:42 -08:00
Bitcode [NFC] Silence compiler warning [-Wmissing-braces]. 2020-02-18 10:37:12 -08:00
Bitstream Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
CodeGen [DAGCombine] Fix alias analysis for unaligned accesses 2020-02-28 18:44:36 +00:00
DWARFLinker [DWARFLinker][NFC] Remove usages of "const object::ObjectFile" from DWARFLinker. 2020-02-28 13:26:22 +03:00
DebugInfo [DebugInfo] Fix parsing DWARF64 units in DWP. 2020-02-28 15:35:51 +07:00
Demangle Use std::foo_t rather than std::foo in LLVM. 2020-02-11 15:12:51 -08:00
ExecutionEngine [ORC] Remove the JITDylib::SymbolTableEntry::isInMaterializingState() method. 2020-02-25 16:44:12 -08:00
Frontend [NFC] Revert unnecessary parts of b91c267380 2020-02-15 01:38:58 -06:00
FuzzMutate Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Fuzzer
IR Remove BinaryOperator::CreateFNeg 2020-02-27 09:06:03 -08:00
IRReader
LTO Improve comments after 8404aeb56a. 2020-02-18 14:25:21 -05:00
LineEditor Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Linker IR Linking: Support merging Warning+Max module metadata flags 2020-02-07 16:29:58 -08:00
MC [XCOFF] Don't emit non-external labels in the symbol table and handle MCSA_LGlobal 2020-02-27 13:37:13 -05:00
MCA Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Object [NFC] Fix typo in error message 2020-02-24 18:22:05 +01:00
ObjectYAML [yaml2obj] - Address post commit comments for D74764 2020-02-25 13:26:46 +03:00
Option Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Passes IR printing for single function with the new pass manager. 2020-02-23 15:28:57 -08:00
ProfileData Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Remarks Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
Support llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
TableGen Fix assertion on `!eq(?, 0)` 2020-02-18 14:05:55 -08:00
Target [X86] Recognize CVTPH2PS from STRICT_FP_EXTEND 2020-02-28 10:19:57 -08:00
Testing
TextAPI [llvm][TextAPI] add simulators to output 2020-02-11 10:37:37 -08:00
ToolDrivers [llvm] Replace SmallStr.str().str() with std::string conversion operator. 2020-01-29 21:16:46 -08:00
Transforms [VectorCombine] Fix assert on compare extract index 2020-02-28 10:37:08 -08:00
WindowsManifest build: process the libxml2 library path for embedding 2020-02-27 22:00:30 -08:00
XRay Use std::foo_t rather than std::foo in LLVM. 2020-02-11 15:12:51 -08:00
CMakeLists.txt [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. 2020-01-08 14:15:31 +03:00
LLVMBuild.txt [Dsymutil][Debuginfo][NFC] Reland: Refactor dsymutil to separate DWARF optimizing part. #2. 2020-01-08 14:15:31 +03:00