llvm::RecurKind

These are the kinds of recurrences that we support.

Synopsis

Declared in <llvm/Analysis/IVDescriptors.h>

enum class RecurKind : int;

Members

NameDescription
None Not a recurrence.
Add Sum of integers.
Sub Subtraction of integers
AddChainWithSubs A chain of adds and subs
Mul Product of integers.
Or Bitwise or logical OR of integers.
And Bitwise or logical AND of integers.
Xor Bitwise or logical XOR of integers.
SMin Signed integer min implemented in terms of select(cmp()).
SMax Signed integer max implemented in terms of select(cmp()).
UMin Unsigned integer min implemented in terms of select(cmp()).
UMax Unsigned integer max implemented in terms of select(cmp()).
FAdd Sum of floats.
FAddChainWithSubs A chain of fadds and fsubs.
FSub Subtraction of floats.
FMul Product of floats.
FMin FP min implemented in terms of select(cmp()).
FMax FP max implemented in terms of select(cmp()).
FMinNum FP min with llvm.minnum semantics including NaNs.
FMaxNum FP max with llvm.maxnum semantics including NaNs.
FMinimum FP min with llvm.minimum semantics
FMaximum FP max with llvm.maximum semantics
FMinimumNum FP min with llvm.minimumnum semantics
FMaximumNum FP max with llvm.maximumnum semantics
FMulAdd Sum of float products with llvm.fmuladd(a * b + sum).
AnyOf AnyOf reduction with select(cmp(),x,y) where one of (x,y) is loop invariant, and both x and y are integer type.
FindIV FindIV reduction with select(icmp(),x,y) where one of (x,y) is a loop induction variable (increasing or decreasing), and both x and y are integer type. The signedness and direction are stored separately.
FindLast FindLast reduction with select(cmp(),x,y) where x and y are an integer type, one is the current recurrence value, and the other is an arbitrary value.

Non-Member Functions

NameDescription
getMinMaxReductionIntrinsicOpReturns the min/max intrinsic used when expanding a min/max reduction.
getMinMaxReductionPredicateReturns the comparison predicate used when expanding a min/max reduction.
getMinMaxReductionRecurKindReturns the recurence kind used when expanding a min/max reduction.
getRecurrenceIdentityGiven information about an recurrence kind, return the identity for the llvm.vector.reduce.* used to generate it.
getReductionIntrinsicIDReturns the llvm.vector.reduce intrinsic that corresponds to the recurrence kind.