[ARM] Improve codegen of volatile load/store of i64
authorVictor Campos <victor.campos@arm.com>
Mon, 9 Mar 2020 13:29:37 +0000 (13:29 +0000)
committerVictor Campos <victor.campos@arm.com>
Wed, 11 Mar 2020 10:19:27 +0000 (10:19 +0000)
commit8a12553223180246eeafaa0fa7bfa11e834d34b6
tree257ff9d07715da873e2edae55256a8af5aa1edc0
parent9304decdeeb89390256d0193bc3bd40fb40e6bd5
[ARM] Improve codegen of volatile load/store of i64

Summary:
Instead of generating two i32 instructions for each load or store of a volatile
i64 value (two LDRs or STRs), now emit LDRD/STRD.

These improvements cover architectures implementing ARMv5TE or Thumb-2.

The code generation explicitly deviates from using the register-offset
variant of LDRD/STRD. In this variant, the register allocated to the
register-offset cannot be reused in any of the remaining operands. Such
restriction seems to be non-trivial to implement in LLVM, thus it is
left as a to-do.

Reviewers: dmgreen, efriedma, john.brawn, nickdesaulniers

Reviewed By: efriedma, nickdesaulniers

Subscribers: danielkiss, alanphipps, hans, nathanchance, nickdesaulniers, vvereschaka, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70072
llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/test/CodeGen/ARM/i64_volatile_load_store.ll [new file with mode: 0644]