[PATCH] D73555: [SVE] Fix bug in simplification of scalable vector instructions

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 12:17:23 PST 2020


ctetreau updated this revision to Diff 242150.
ctetreau added a comment.

[SVE] Fix bug in simplification of scalable vector instructions

- 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


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73555/new/

https://reviews.llvm.org/D73555

Files:
  llvm/include/llvm/IR/Instructions.h
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/IR/ConstantFold.cpp
  llvm/lib/IR/Instructions.cpp
  llvm/test/Analysis/ConstantFolding/vscale-getelementptr.ll
  llvm/test/Analysis/ConstantFolding/vscale-shufflevector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73555.242150.patch
Type: text/x-patch
Size: 15158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200203/a43ae615/attachment.bin>


More information about the llvm-commits mailing list