[AArch64] Merge LDRSWpre-LD[U]RSW pair into LDPSWpre
authorZhuojia Shen <chaosdefinition@hotmail.com>
Fri, 23 Jun 2023 19:49:05 +0000 (12:49 -0700)
committerZhuojia Shen <chaosdefinition@hotmail.com>
Tue, 18 Jul 2023 16:46:47 +0000 (09:46 -0700)
commitb0093e13fcfdd4eea5bbd7ae57d3d1b82f4135c3
tree08cf98e17492133524704d3e33a985bc68e3cac7
parent94f76004d53d4c5fe98d9e5d0dc8292cc04218fa
[AArch64] Merge LDRSWpre-LD[U]RSW pair into LDPSWpre

This patch optimizes a pair of LDRSWpre and LDRSWui (or LDURSWi)
instructions into a single LDPSWpre instruction.  This is a missing case
in D99272.

MIR test cases in D152564 are updated to verify the optimization.

Differential Revision: https://reviews.llvm.org/D152407
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
llvm/test/CodeGen/AArch64/ldrpre-ldr-merge.mir