llvm-project/llvm/lib/CodeGen/SelectionDAG
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
..
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
DAGCombiner.cpp [DAGCombine] Fix alias analysis for unaligned accesses 2020-02-28 18:44:36 +00:00
FastISel.cpp Add dbgs() output to help track down missing DW_AT_location bugs, NFC 2020-02-13 14:38:44 -08:00
FunctionLoweringInfo.cpp [KnownBits] Introduce anyext instead of passing a flag into zext 2020-02-12 19:06:53 +00:00
InstrEmitter.cpp Reland "[WebAssembly][InstrEmitter] Foundation for multivalue call lowering" 2020-02-18 13:49:46 -08:00
InstrEmitter.h [SelectionDAG] Enhance the simplification of `copyto` from `implicit-def`. 2019-05-27 18:26:29 +00:00
LLVMBuild.txt
LegalizeDAG.cpp No longer generate calls to *_finite 2020-02-28 10:07:37 +01:00
LegalizeFloatTypes.cpp [X86][LegalizeTypes] Add SoftPromoteHalf support STRICT_FP_EXTEND and STRICT_FP_ROUND 2020-02-11 22:30:04 -08:00
LegalizeIntegerTypes.cpp [SelectionDAG][PowerPC][AArch64][X86][ARM] Add chain input and output the ISD::FLT_ROUNDS_ 2020-02-25 16:58:23 -08:00
LegalizeTypes.cpp [LegalizeTypes][ARM][AArch64][PowerPC][RISCV][X86] Use BUILD_PAIR to return expanded integer results from ReplaceNodeResults instead of just returning two results. 2020-02-08 09:52:31 -08:00
LegalizeTypes.h [LegalizeTypes][X86] Add a new strategy for type legalizing f16 type that softens it to i16, but promotes to f32 around arithmetic ops. 2020-02-01 11:21:04 -08:00
LegalizeTypesGeneric.cpp [LegalizeTypes][X86] Add a new strategy for type legalizing f16 type that softens it to i16, but promotes to f32 around arithmetic ops. 2020-02-01 11:21:04 -08:00
LegalizeVectorOps.cpp [SDAG] Add SDNode::values() = make_range(values_begin(), values_end()) 2020-02-26 12:07:38 -06:00
LegalizeVectorTypes.cpp [LegalizeTypes] Scalarize non-byte sized loads in WidenRecRes_Load and SplitVecResLoad 2020-02-24 15:14:33 -08:00
ResourcePriorityQueue.cpp Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
SDNodeDbgValue.h
ScheduleDAGFast.cpp Finish moving TargetRegisterInfo::isVirtualRegister() and friends to llvm::Register as started by r367614. NFC 2019-08-01 23:27:28 +00:00
ScheduleDAGRRList.cpp [ScheduleDAG] When a node is cloned, add an edge between the nodes. 2019-10-04 19:51:40 +00:00
ScheduleDAGSDNodes.cpp Allow "callbr" to return non-void values 2020-02-24 18:29:06 -08:00
ScheduleDAGSDNodes.h Prune Analysis includes from SelectionDAG.h 2019-10-19 01:07:48 +00:00
ScheduleDAGVLIW.cpp Prune Analysis includes from SelectionDAG.h 2019-10-19 01:07:48 +00:00
SelectionDAG.cpp [SelectionDAG] Merge constant SDNode arithmetic into foldConstantArithmetic 2020-02-24 18:54:22 +00:00
SelectionDAGAddressAnalysis.cpp Prune a LegacyDivergenceAnalysis and MachineLoopInfo include each 2019-10-19 01:31:09 +00:00
SelectionDAGBuilder.cpp [SelectionDAG][PowerPC][AArch64][X86][ARM] Add chain input and output the ISD::FLT_ROUNDS_ 2020-02-25 16:58:23 -08:00
SelectionDAGBuilder.h [FPEnv] Fix chain handling regression after 04a8696 2020-01-14 14:10:57 +01:00
SelectionDAGDumper.cpp [Intrinsic] Add fixed point saturating division intrinsics. 2020-02-24 10:50:52 +01:00
SelectionDAGISel.cpp Add dbgs() output to help track down missing DW_AT_location bugs, NFC 2020-02-13 14:38:44 -08:00
SelectionDAGPrinter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
SelectionDAGTargetInfo.cpp
StatepointLowering.cpp [Statepoint] Remove redundant clear of call target on register 2020-02-13 10:25:50 +07:00
StatepointLowering.h [FastISel] Fix crash for gc.relocate lowring 2019-04-05 05:41:08 +00:00
TargetLowering.cpp [TargetLowering] SimplifyDemandedBits - fix SCALAR_TO_VECTOR knownbits bug 2020-02-28 15:23:37 +00:00