[all-commits] [llvm/llvm-project] 1d42ba: [BasicTTIImpl] Fix getCastInstrCost for scalable v...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Fri Feb 12 00:29:32 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d42ba254fa3203f1ad5916ed414a84312f5bba9
      https://github.com/llvm/llvm-project/commit/1d42ba254fa3203f1ad5916ed414a84312f5bba9
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2021-02-12 (Fri, 12 Feb 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/test/Analysis/CostModel/AArch64/cast.ll

  Log Message:
  -----------
  [BasicTTIImpl] Fix getCastInstrCost for scalable vectors by querying for ElementCount.

This fixes an overly restrictive assumption that the vector is a FixedVectorType,
in code that tries to calculate the cost of a cast operation when splitting
a too-wide vector. The algorithm works the same for scalable vectors, so this
patch removes the cast<FixedVectorType>.

Reviewed By: david-arm

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




More information about the All-commits mailing list