[all-commits] [llvm/llvm-project] 782231: [SVE] Fix invalid uses of VectorType::getNumElemen...

Christopher Tetreault via All-commits all-commits at lists.llvm.org
Wed May 6 10:06:38 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 782231ac799fd9c58d317c7ba168495510995df8
      https://github.com/llvm/llvm-project/commit/782231ac799fd9c58d317c7ba168495510995df8
  Author: Christopher Tetreault <ctetreau at quicinc.com>
  Date:   2020-05-06 (Wed, 06 May 2020)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp

  Log Message:
  -----------
  [SVE] Fix invalid uses of VectorType::getNumElements() in ValueTracking

Summary:
Any function in this module that make use of DemandedElts laregely does
not work with scalable vectors. DemandedElts is used to define which
elements of the vector to look at. At best, for scalable vectors, we can
express the first N elements of the vector. However, in practice, most
code that uses these functions expect to be able to talk about the
entire vector. In principle, this module should be able to be extended
to work with scalable vectors. However, before we can do that, we should
ensure that it does not cause code with scalable vectors to miscompile.
All functions that use a DemandedElts will bail out if the vector is
scalable. Usages of getNumElements() are updated to go through
FixedVectorType pointers.

Reviewers: rengolin, efriedma, sdesmalen, c-rhodes, spatel

Reviewed By: efriedma

Subscribers: david-arm, tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list