[PATCH] D133408: [AArch64] Use misaligned load/store to optimize memory access with non-power2 integer types.

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 02:33:31 PDT 2022


bcl5980 created this revision.
bcl5980 added reviewers: efriedma, dmgreen, paulwalker-arm.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When load integer types with non-power2 aligned size, we will split the load to some no overlap legal type loads.
For example, if we trying to legalize i56, it will be split to i32 + i16 + i8 three loads.
This change trying to use two i32 load with 8bits overlap to reduce the load number.

The motivation comes from ARM64EC (https://reviews.llvm.org/D125418#inline-1267564). 
For now, we don't apply it to store because it will involve extra dependency in CPU load store queue.


https://reviews.llvm.org/D133408

Files:
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.h
  llvm/test/CodeGen/AArch64/arm64-non-pow2-ldst.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133408.458396.patch
Type: text/x-patch
Size: 8181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220907/e304bb57/attachment.bin>


More information about the llvm-commits mailing list