[all-commits] [llvm/llvm-project] 7e717b: [AArch64][SVE] Extend int_aarch64_sve_ld1_gather_imm

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Mon Jan 20 04:22:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e717b3990554f0fde43e3747529477a70072cfe
      https://github.com/llvm/llvm-project/commit/7e717b3990554f0fde43e3747529477a70072cfe
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2020-01-20 (Mon, 20 Jan 2020)

  Changed paths:
    M llvm/include/llvm/IR/IntrinsicsAArch64.td
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
    M llvm/test/CodeGen/AArch64/sve-gather-scatter-dag-combine.ll
    A llvm/test/CodeGen/AArch64/sve-intrinsics-gather-loads-vector-base-imm-offset.ll
    A llvm/test/CodeGen/AArch64/sve-intrinsics-gather-loads-vector-base-scalar-offset.ll
    R llvm/test/CodeGen/AArch64/sve-intrinsics-gather-loads-vector-base.ll
    A llvm/test/CodeGen/AArch64/sve-intrinsics-scatter-stores-vector-base-imm-offset.ll
    A llvm/test/CodeGen/AArch64/sve-intrinsics-scatter-stores-vector-base-scalar-offset.ll
    R llvm/test/CodeGen/AArch64/sve-intrinsics-scatter-stores-vector-base.ll

  Log Message:
  -----------
  [AArch64][SVE] Extend int_aarch64_sve_ld1_gather_imm

The ACLE distinguishes between the following addressing modes for gather
loads:
  * "scalar base, vector offset", and
  * "vector base, scalar offset".
For the "vector base, scalar offset" case, the
`int_aarch64_sve_ld1_gather_imm` intrinsic was added in 79f2422d.
Currently, that intrinsic assumes that the scalar offset is passed as an
immediate.  As a result, it does not cater for cases where scalar offset
is stored in a register.

In this patch `int_aarch64_sve_ld1_gather_imm` is extended so that all
cases are covered:
* `int_aarch64_sve_ld1_gather_imm` is renamed as
  `int_aarch64_sve_ld1_gather_scalar_offset`
* new DAG combine rules are added for GLD1_IMM for scenarios where the
  offset is a non-immediate scalar or an out-of-range immediate
* sve-intrinsics-gather-loads-vector-base.ll is renamed as
  sve-intrinsics-gather-loads-vector-base-imm-offset.ll
* sve-intrinsics-gather-loads-vector-base-scalar-offset.ll is added to test
  file for non-immediate offsets

Similar changes are made for scatter store intrinsics.

Reviewed By: sdesmalen, efriedma

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




More information about the All-commits mailing list