[PATCH] D87529: [AArch64][GlobalISel] Refactor + improve CMN, ADDS, and ADD emit functions
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 10:28:48 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.
These functions were extremely similar:
- `emitADD`
- `emitADDS`
- `emitCMN`
Refactor them a little, introducing a more generic `emitInstr` function to do most of the work.
Also add support for the immediate + shifted register addressing modes in each of them.
Update select-uaddo.mir to show that selecing ADDS now supports folding immediates + shifts. (I don't think this can impact CMN, because the CMN checks require a G_SUB with a non-constant on the RHS.)
This is around a 0.02% code size improvement on CTMark at -O3.
https://reviews.llvm.org/D87529
Files:
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/select-uaddo.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87529.291264.patch
Type: text/x-patch
Size: 8896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/e135e1be/attachment.bin>
More information about the llvm-commits
mailing list