[all-commits] [llvm/llvm-project] ffe998: [AArch64][GlobalISel] Refactor + improve CMN, ADDS...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Tue Sep 15 17:18:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ffe9986de4297fdeddcd0b0b9bac2a28c45f661b
      https://github.com/llvm/llvm-project/commit/ffe9986de4297fdeddcd0b0b9bac2a28c45f661b
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2020-09-15 (Tue, 15 Sep 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/select-uaddo.mir

  Log Message:
  -----------
  [AArch64][GlobalISel] Refactor + improve CMN, ADDS, and ADD emit functions

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.

Differential Revision: https://reviews.llvm.org/D87529




More information about the All-commits mailing list