[all-commits] [llvm/llvm-project] 525b8e: [SVE] Fix wrong usage of getNumElements() in match...

david-arm via All-commits all-commits at lists.llvm.org
Fri May 15 00:45:28 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 525b8e6dcbbd6e40fd9d91e4ed349a93381c1ccc
      https://github.com/llvm/llvm-project/commit/525b8e6dcbbd6e40fd9d91e4ed349a93381c1ccc
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M llvm/lib/IR/Function.cpp
    A llvm/test/CodeGen/AArch64/sve-bad-intrinsics.ll

  Log Message:
  -----------
  [SVE] Fix wrong usage of getNumElements() in matchIntrinsicType

I have changed the ScalableVecArgument case in matchIntrinsicType
to create a new FixedVectorType. This means that the next case we
hit (Vector) will not assert when calling getNumElements(), since
we know that it's always a FixedVectorType. This is a temporary
measure for now, and it will be fixed properly in another patch
that refactors this code.

The changes are covered by this existing test:

CodeGen/AArch64/sve-intrinsics-fp-converts.ll

In addition, I have added a new test to ensure that we correctly
reject SVE intrinsics when called with fixed length vector types.

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




More information about the All-commits mailing list