Skip to content

Commit f5e8555

Browse files
committed
Add isFixed, getZero, getScalableFixedMin/Max convenience methods
1 parent 6265205 commit f5e8555

File tree

2 files changed

+140
-122
lines changed

2 files changed

+140
-122
lines changed

llvm/include/llvm/Support/TypeSize.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ template <typename LeafTy, typename ValueTy> class FixedOrScalableQuantity {
170170
/// Returns whether the quantity is scaled by a runtime quantity (vscale).
171171
constexpr bool isScalable() const { return Scalable; }
172172

173+
/// Returns true if the quantity is not scaled by vscale.
174+
constexpr bool isFixed() const { return !Scalable; }
175+
173176
/// A return value of true indicates we know at compile time that the number
174177
/// of elements (vscale * Min) is definitely even. However, returning false
175178
/// does not guarantee that the total number of elements is odd.

0 commit comments

Comments
 (0)