diff options
author | Amara Emerson <amara@apple.com> | 2020-08-14 02:00:07 -0700 |
---|---|---|
committer | Amara Emerson <amara@apple.com> | 2020-08-18 10:42:15 -0700 |
commit | 04a6ea5d77e7613a5e1398ddf2a0fcb4e1cea41c (patch) | |
tree | 3ec1ed1bcc7a493ccf381e1c94f8e7d2f1872ca0 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 40e269ea6db9c755c27e2ee1e201a640ac085afd (diff) | |
download | llvm-04a6ea5d77e7613a5e1398ddf2a0fcb4e1cea41c.zip llvm-04a6ea5d77e7613a5e1398ddf2a0fcb4e1cea41c.tar.gz llvm-04a6ea5d77e7613a5e1398ddf2a0fcb4e1cea41c.tar.bz2 |
[GlobalISel] Add a combine for sext_inreg(load x), c --> sextload x
This is restricted to single use loads, which if we fold to sextloads we can
find more optimal addressing modes on AArch64.
This also fixes an overload the MachineFunction::getMachineMemOperand() method
which was incorrectly using the MF alignment instead of the MMO alignment.
Differential Revision: https://reviews.llvm.org/D85966
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 464f71a..abf4784 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -477,7 +477,7 @@ MachineMemOperand *MachineFunction::getMachineMemOperand( MachineMemOperand *MachineFunction::getMachineMemOperand( const MachineMemOperand *MMO, MachinePointerInfo &PtrInfo, uint64_t Size) { return new (Allocator) MachineMemOperand( - PtrInfo, MMO->getFlags(), Size, Alignment, AAMDNodes(), nullptr, + PtrInfo, MMO->getFlags(), Size, MMO->getBaseAlign(), AAMDNodes(), nullptr, MMO->getSyncScopeID(), MMO->getOrdering(), MMO->getFailureOrdering()); } |