diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2020-08-08 12:22:40 -0400 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2020-08-20 16:17:30 -0400 |
commit | 79ce9bb3803998fc2a20ce1c88392cf292f35f92 (patch) | |
tree | d86367187c2f2518625d928715122bdf048c4715 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 18b218007db69627bb651bb2a548afe92d615cd3 (diff) | |
download | llvm-79ce9bb3803998fc2a20ce1c88392cf292f35f92.zip llvm-79ce9bb3803998fc2a20ce1c88392cf292f35f92.tar.gz llvm-79ce9bb3803998fc2a20ce1c88392cf292f35f92.tar.bz2 |
CodeGen: Don't drop AA metadata when splitting MachineMemOperands
Assuming this is used to split a memory access into smaller pieces,
the new access should still have the same aliasing properties as the
original memory access. As far as I can tell, this wasn't
intentionally dropped. It may be necessary to drop this if you are
moving the operand outside of the bounds of the original object in
such a way that it may alias another IR object, but I don't think any
of the existing users are doing this. Some of the uses widen into
unused alignment padding, which I think is OK.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index abf4784..0950d64 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -492,9 +492,11 @@ MachineFunction::getMachineMemOperand(const MachineMemOperand *MMO, ? commonAlignment(MMO->getBaseAlign(), Offset) : MMO->getBaseAlign(); + // Do not preserve ranges, since we don't necessarily know what the high bits + // are anymore. return new (Allocator) MachineMemOperand(PtrInfo.getWithOffset(Offset), MMO->getFlags(), Size, - Alignment, AAMDNodes(), nullptr, MMO->getSyncScopeID(), + Alignment, MMO->getAAInfo(), nullptr, MMO->getSyncScopeID(), MMO->getOrdering(), MMO->getFailureOrdering()); } |