[all-commits] [llvm/llvm-project] fb7c38: [AArch64][ISel] Always use pre-inc/post-inc addres...
Huihui Zhang via All-commits
all-commits at lists.llvm.org
Thu Feb 16 16:19:31 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fb7c38073e800ec35f2d54d79630c68a4b901b4c
https://github.com/llvm/llvm-project/commit/fb7c38073e800ec35f2d54d79630c68a4b901b4c
Author: Huihui Zhang <huihuiz at quicinc.com>
Date: 2023-02-16 (Thu, 16 Feb 2023)
Changed paths:
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.h
A llvm/test/CodeGen/AArch64/pre-indexed-addrmode-with-constant-offset.ll
Log Message:
-----------
[AArch64][ISel] Always use pre-inc/post-inc addressing mode for auto-indexed load/store with constant offset.
Unlike ARM target, current AArch64 target doesn't have facility to encode the
operation bit: whether to add an offset to base pointer for pre-inc/post-inc
addressing mode, or to subtract an offset from base pointer for
pre-dec/post-dec addressing mode.
A mis-compile (https://github.com/llvm/llvm-project/issues/60645) was noticed
due to this limitation.
Therefore, for AArch64 auto-indexed load/store with constant offset, always
use pre-inc/post-inc addressing mode. The constant offset is negated for
pre-dec/post-dec addressing mode.
An auto-indexed address with non-constant offset is currently not split into
base and offset parts. If we are to handle non-constant offset in the future,
offset node will need to take a negate.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D143796
More information about the All-commits
mailing list