[all-commits] [llvm/llvm-project] c42053: [AArch64][GlobalISel] Select arith extended add/su...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Wed Nov 11 09:26:46 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c42053f79b6c25154345b1c10c7b7c743e480698
      https://github.com/llvm/llvm-project/commit/c42053f79b6c25154345b1c10c7b7c743e480698
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-compare.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/select-ptr-add.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/select-uaddo.mir

  Log Message:
  -----------
  [AArch64][GlobalISel] Select arith extended add/sub in manual selection code

The manual selection code for add/sub was not checking if it was possible to
fold in shifts + extends (the *rx opcode variants).

As a result, we could never select things like

```
cmp x1, w0, uxtw #2
```

Because we don't import any patterns for compares.

This adds support for the arithmetic shifted register forms and updates tests
for instructions selected using `emitADD`, `emitADDS`, and `emitSUBS`.

This is a 0.1% geomean code size improvement on SPECINT2000 at -Os.

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




More information about the All-commits mailing list