[PATCH] D84784: [AArch64][GlobalISel] Select XRO addressing mode with wide immediates
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 11:48:10 PDT 2020
paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
Herald added a project: LLVM.
paquette requested review of this revision.
Port the wide immediate case from AArch64DAGToDAGISel::SelectAddrModeXRO.
If we have a wide immediate which can't be represented in an add, we can end up with code like this:
mov x0, imm
add x1, base, x0
ldr x2, [x1, 0]
If we use the [base, xN] addressing mode instead, we can produce this:
mov x0, imm
ldr x2, [base, x0]
This saves 0.4% code size on 7zip at -O3, and gives a geomean code size improvement of 0.1% on CTMark.
https://reviews.llvm.org/D84784
Files:
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/xro-addressing-mode-constant.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84784.281307.patch
Type: text/x-patch
Size: 9530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200728/665ece60/attachment.bin>
More information about the llvm-commits
mailing list