[all-commits] [llvm/llvm-project] 31574d: [SVE] Fix bug in simplification of scalable vector...

Christopher Tetreault via All-commits all-commits at lists.llvm.org
Mon Feb 3 10:16:42 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 31574d38ac5fa4646cf01dd252a23e682402134f
      https://github.com/llvm/llvm-project/commit/31574d38ac5fa4646cf01dd252a23e682402134f
  Author: Christopher Tetreault <ctetreau at quicinc.com>
  Date:   2020-02-03 (Mon, 03 Feb 2020)

  Changed paths:
    M llvm/include/llvm/IR/Instructions.h
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/lib/IR/Instructions.cpp
    A llvm/test/Analysis/ConstantFolding/vscale-getelementptr.ll
    A llvm/test/Analysis/ConstantFolding/vscale-shufflevector.ll

  Log Message:
  -----------
  [SVE] Fix bug in simplification of scalable vector instructions

Summary:
* Most of the simplifications in SimplifyShuffleVectorInst depend on the
concrete value of, or the length of the mask vector. For scalable
vectors, this cannot be known at compile time.
** for these tests, detect if the vector is scalable before attempting
the transformation
* The functions ShuffleVectorInst::getMaskValue and
ShuffleVectorInst::getShuffleMask access the value of the constant mask.
However, since the length of the mask is unknown at compile time, these
function do not work for scalable vectors. Add asserts to ensure that
the input mask is not scalable

Reviewers: efriedma, sdesmalen, apazos, chrisj, huihuiz

Reviewed By: efriedma

Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list