[all-commits] [llvm/llvm-project] 961e95: [AArch64][SVE] Add more folds to make use of gathe...

CarolineConcatto via All-commits all-commits at lists.llvm.org
Thu Feb 3 11:23:29 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 961e954af592771f1323e41a049d25f433eaabb6
      https://github.com/llvm/llvm-project/commit/961e954af592771f1323e41a049d25f433eaabb6
  Author: Caroline Concatto <caroline.concatto at arm.com>
  Date:   2022-02-03 (Thu, 03 Feb 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/sve-gather-scatter-addr-opts.ll

  Log Message:
  -----------
  [AArch64][SVE] Add more folds to make use of gather/scatter with 32-bit indices

In AArch64ISelLowering.cpp this patch implements this fold:

1) GEP (%ptr, SHL ((stepvector(A) + splat(%offset))) << splat(B)))
into GEP (%ptr + (%offset << B), step_vector (A << B))

The above transform simplifies the index operand so that it can be expressed
as i32 elements.
This allows using only one gather/scatter assembly instruction instead of two.

Patch by Paul Walker (@paulwalker-arm).

Depends on D117900

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




More information about the All-commits mailing list