[all-commits] [llvm/llvm-project] 680d3f: [ARM] Use rq gather/scatters for smaller v4 vectors

David Green via All-commits all-commits at lists.llvm.org
Tue Jun 15 09:06:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 680d3f8f1785adcb128d8727234631fe866acb04
      https://github.com/llvm/llvm-project/commit/680d3f8f1785adcb128d8727234631fe866acb04
  Author: David Green <david.green at arm.com>
  Date:   2021-06-15 (Tue, 15 Jun 2021)

  Changed paths:
    M llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
    M llvm/test/CodeGen/Thumb2/mve-gather-ptrs.ll
    M llvm/test/CodeGen/Thumb2/mve-scatter-ind32-scaled.ll
    M llvm/test/CodeGen/Thumb2/mve-scatter-ptrs.ll

  Log Message:
  -----------
  [ARM] Use rq gather/scatters for smaller v4 vectors

A pointer will always fit into an i32, so a rq offset gather/scatter can
be used with v4i8 and v4i16 gathers, using a base of 0 and the Ptr as
the offsets. The rq gather can then correctly extend the type, allowing
us to use the gathers without falling back to scalarizing.

This patch rejigs tryCreateMaskedGatherOffset in the
MVEGatherScatterLowering pass to decompose the Ptr into Base:0 +
Offset:Ptr (with a scale of 1), if the Ptr could not be decomposed from
a GEP. v4i32 gathers will already use qi gathers, this extends that to
v4i8 and v4i16 gathers using the extending rq variants.

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




More information about the All-commits mailing list