[all-commits] [llvm/llvm-project] 4b776a: [SVE] Fix invalid usages of getNumElements in Shuf...

Christopher Tetreault via All-commits all-commits at lists.llvm.org
Wed Jun 17 13:46:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b776a98f1a425e264545b5c2abeff9e83a6f947
      https://github.com/llvm/llvm-project/commit/4b776a98f1a425e264545b5c2abeff9e83a6f947
  Author: Christopher Tetreault <ctetreau at quicinc.com>
  Date:   2020-06-17 (Wed, 17 Jun 2020)

  Changed paths:
    M llvm/include/llvm/IR/Instructions.h
    M llvm/lib/IR/Instructions.cpp

  Log Message:
  -----------
  [SVE] Fix invalid usages of getNumElements in ShuffleVectorInstruction

Summary:
Fix invalid usages of getNumElements identified by test case
LLVM.Transforms/InstCombine::vscale_extractelement.ll.

changesLength: Since the length of the llvm::SmallVector shufflemask
is related to the minimum number of elements in a scalable vector, it is
fine to just get the Min field of the ElementCount

isIdentityWithExtract: Since it is not possible to express the mask
needed for this pattern for scalable vectors, we can just bail before
calling getNumElements()

Reviewers: efriedma, sdesmalen, fpetrogalli, gchatelet, yrouban, craig.topper

Reviewed By: sdesmalen

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

Tags: #llvm

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




More information about the All-commits mailing list