[all-commits] [llvm/llvm-project] bede01: [CodeGen][LLT] Add isFixedVector and isScalableVec...

Michael Maitland via All-commits all-commits at lists.llvm.org
Thu Nov 9 11:31:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bede0106d0df0ac77df7e5716e73cae96029e289
      https://github.com/llvm/llvm-project/commit/bede0106d0df0ac77df7e5716e73cae96029e289
  Author: Michael Maitland <michaeltmaitland at gmail.com>
  Date:   2023-11-09 (Thu, 09 Nov 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/LowLevelType.h
    M llvm/unittests/CodeGen/LowLevelTypeTest.cpp

  Log Message:
  -----------
  [CodeGen][LLT] Add isFixedVector and isScalableVector (#71713)

The current isScalable function requires a user to call isVector before
hand in order to avoid an assertion failure in the case that the LLT is
not a vector.

This patch addds helper functions that allow a user to query whether the
LLT is fixed or scalable, not wanting an assertion failure in the case
that the LLT was never a vector in the first place.




More information about the All-commits mailing list