[all-commits] [llvm/llvm-project] c46b85: [LoopVectorize] Fix cost for calls to functions th...

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Wed Feb 26 19:42:20 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c46b85aaf4d442f732e2cf8e84076b374187921c
      https://github.com/llvm/llvm-project/commit/c46b85aaf4d442f732e2cf8e84076b374187921c
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2020-02-26 (Wed, 26 Feb 2020)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/widened-massv-call.ll
    A llvm/test/Transforms/LoopVectorize/widened-massv-vfabi-attr.ll

  Log Message:
  -----------
  [LoopVectorize] Fix cost for calls to functions that have vector versions

A recent commit
(https://reviews.llvm.org/rG66c120f02560ef528a60924104ead66f330190f1) changed
the cost for calls to functions that have a vector version for some
vectorization factor. However, no check is performed for whether the
vectorization factor matches the current one being cost modeled. This leads to
attempts to widen call instructions to a vectorization factor for which such a
function does not exist, which in turn leads to an assertion failure.

This patch adds the check for vectorization factor (i.e. not just that the
called function has a vector version for some VF, but that it has a vector
version for this VF).

Differential revision: https://reviews.llvm.org/D74944




More information about the All-commits mailing list