[all-commits] [llvm/llvm-project] 8d830f: [LV] Replace fixed-order cost model with a SK_Spli...

David Green via All-commits all-commits at lists.llvm.org
Wed Aug 24 05:00:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d830f8d68d19e9b654ec61a20bf43302068e43a
      https://github.com/llvm/llvm-project/commit/8d830f8d68d19e9b654ec61a20bf43302068e43a
  Author: David Green <david.green at arm.com>
  Date:   2022-08-24 (Wed, 24 Aug 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/ARM/mve-recurrence.ll

  Log Message:
  -----------
  [LV] Replace fixed-order cost model with a SK_Splice shuffle

The existing cost model for fixed-order recurrences models the phi as an
extract shuffle of a v1 vector. The shuffle produced should be a splice,
as they take two vectors inputs are extracting from a subset of the
lanes. On certain architectures the existing cost model can drastically
under-estimate the correct cost for the shuffle, so this changes it to a
SK_Splice and passes a correct Mask through to the getShuffleCost call.

I believe this might be the first use of a SK_Splice shuffle cost model
outside of scalable vectors, and some targets may require additions to
the cost-model to correctly account for them. In tree targets appear to
all have been updated where needed.

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




More information about the All-commits mailing list