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

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 07:29:14 PST 2020


ctetreau created this revision.
Herald added subscribers: llvm-commits, psnobl, rkruppe, hiraditya, tschuett.
Herald added a reviewer: efriedma.
Herald added a project: LLVM.

- 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

https://reviews.llvm.org/D73555

Files:
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/IR/Instructions.cpp
  llvm/test/Analysis/ConstantFolding/vscale-shufflevector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73555.240881.patch
Type: text/x-patch
Size: 9617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200128/3bb7c9fe/attachment.bin>


More information about the llvm-commits mailing list