Skip to content

Commit

Permalink
Add isFixed, getZero, getScalableFixedMin/Max convenience methods
Browse files Browse the repository at this point in the history
  • Loading branch information
huntergr-arm committed Jun 21, 2024
1 parent 6265205 commit f5e8555
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 122 deletions.
3 changes: 3 additions & 0 deletions llvm/include/llvm/Support/TypeSize.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ template <typename LeafTy, typename ValueTy> class FixedOrScalableQuantity {
/// Returns whether the quantity is scaled by a runtime quantity (vscale).
constexpr bool isScalable() const { return Scalable; }

/// Returns true if the quantity is not scaled by vscale.
constexpr bool isFixed() const { return !Scalable; }

/// A return value of true indicates we know at compile time that the number
/// of elements (vscale * Min) is definitely even. However, returning false
/// does not guarantee that the total number of elements is odd.
Expand Down
Loading

0 comments on commit f5e8555

Please sign in to comment.