[all-commits] [llvm/llvm-project] 0ee7b7: [SVE] Fix invalid use of VectorType::getNumElement...

Christopher Tetreault via All-commits all-commits at lists.llvm.org
Fri May 1 12:35:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ee7b7e3f1bc3079adf9cae99de2d5508b2a7275
      https://github.com/llvm/llvm-project/commit/0ee7b7e3f1bc3079adf9cae99de2d5508b2a7275
  Author: Christopher Tetreault <ctetreau at quicinc.com>
  Date:   2020-05-01 (Fri, 01 May 2020)

  Changed paths:
    M llvm/include/llvm/IR/PatternMatch.h

  Log Message:
  -----------
  [SVE] Fix invalid use of VectorType::getNumElements() in PatternMatch

Summary:
Update cst_pred_ty to only work on FixedVectorType. It operates on
integers and integer vectors, and returns true if the predicate returns
true for all elements of the vector. This operation is not possible on
scalable vectors. Make this behavior explicit in the code and document
the fact that it only tests fixed width vectors.

Identified by test LLVM.Transforms/InstCombine::nsw.ll

Reviewers: efriedma, c-rhodes, david-arm, spatel

Reviewed By: david-arm

Subscribers: tschuett, rkruppe, psnobl, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list