[all-commits] [llvm/llvm-project] 855e02: [SVE] Fix invalid usage of getNumElements() in Ins...

Christopher Tetreault via All-commits all-commits at lists.llvm.org
Tue May 5 15:19:28 PDT 2020


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

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    A llvm/test/Transforms/InstCombine/udiv-pow2-vscale.ll

  Log Message:
  -----------
  [SVE] Fix invalid usage of getNumElements() in InstCombineMulDivRem

Summary:
getLogBase2 tries to iterate over the number of vector elements. Since
the number of elements of a scalable vector is unknown at compile time,
we must return null if the input type is scalable.

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

Reviewers: efriedma, fpetrogalli, kmclaughlin, spatel

Reviewed By: efriedma, fpetrogalli

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

Tags: #llvm

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




More information about the All-commits mailing list