[AArch64] Avoid pairing loads when the base reg is modified
authorCongzhe Cao <congzhe.cao@@huawei.com>
Wed, 30 Sep 2020 17:03:14 +0000 (13:03 -0400)
committerDanilo C. Grael <dancgr@gmail.com>
Wed, 30 Sep 2020 17:06:51 +0000 (13:06 -0400)
commit8d8cb1ad80b7074ac60d070fae89261894d34a0d
tree4477f1b171e5a8d0557e1ddebd82406412ab2b50
parent73fb9698c0573778787e77a8ffa57e7fa3caebd4
[AArch64] Avoid pairing loads when the base reg is modified

When pairing loads, we should check if in between the two loads the
base register has been modified. If that is the case then avoid pairing
them because the second load actually loads from a different address.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D86956
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
llvm/test/CodeGen/AArch64/aarch64-ldst-modified-baseReg.mir [new file with mode: 0644]