[llvm] [LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable (PR #67812)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 3 10:08:13 PST 2024
================
@@ -236,10 +253,26 @@ class RecurrenceDescriptor {
return Kind == RecurKind::IAnyOf || Kind == RecurKind::FAnyOf;
}
+ /// Returns true if the recurrence kind is of the form
+ /// select(cmp(),x,y) where one of (x,y) is increasing loop induction.
+ static bool isFindLastIVRecurrenceKind(RecurKind Kind) {
+ return Kind == RecurKind::IFindLastIV || Kind == RecurKind::FFindLastIV;
+ }
+
/// Returns the type of the recurrence. This type can be narrower than the
/// actual type of the Phi if the recurrence has been type-promoted.
Type *getRecurrenceType() const { return RecurrenceType; }
+ /// Returns the sentinel value used to replace the start value.
----------------
Mel-Chen wrote:
Sure, thank you!
5aa56de94e5639d4c9e7ea85d9e831f4d8467a3d
https://github.com/llvm/llvm-project/pull/67812
More information about the llvm-commits
mailing list