[all-commits] [llvm/llvm-project] 2e080e: [SVE] Add support for scalable vectorization of lo...

david-arm via All-commits all-commits at lists.llvm.org
Fri Jan 22 01:48:38 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e080eb00ad76654313e0e119bb7fa0ffe2f9866
      https://github.com/llvm/llvm-project/commit/2e080eb00ad76654313e0e119bb7fa0ffe2f9866
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Analysis/CostModel/sve-cmpsel.ll
    A llvm/test/Transforms/LoopVectorize/AArch64/sve-basic-vec.ll

  Log Message:
  -----------
  [SVE] Add support for scalable vectorization of loops with selects and cmps

I have removed an unnecessary assert in LoopVectorizationCostModel::getInstructionCost
that prevented a cost being calculated for select instructions when using
scalable vectors. In addition, I have changed AArch64TTIImpl::getCmpSelInstrCost
to only do special cost calculations for fixed width vectors and fall
back to the base version for scalable vectors.

I have added a simple cost model test for cmps and selects:

  test/Analysis/CostModel/sve-cmpsel.ll

and some simple tests that show we vectorize loops with cmp and select:

  test/Transforms/LoopVectorize/AArch64/sve-basic-vec.ll

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




More information about the All-commits mailing list