[llvm] [ValueTracking] Add `matchSimpleBinaryIntrinsicRecurrence` helper (PR #145964)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 08:24:52 PDT 2025
================
@@ -965,6 +966,21 @@ LLVM_ABI bool matchSimpleRecurrence(const PHINode *P, BinaryOperator *&BO,
LLVM_ABI bool matchSimpleRecurrence(const BinaryOperator *I, PHINode *&P,
Value *&Start, Value *&Step);
+/// Attempt to match a simple value-accumulating recurrence of the form:
+/// %llvm.intrinsic.acc = phi Ty [%Init, %Entry], [%llvm.intrinsic, %backedge]
+/// %llvm.intrinsic = call Ty @llvm.intrinsic(%Invariant, %llvm.intrinsic.acc)
----------------
antoniofrighetto wrote:
Right, was mentioned in the doc-comment, but the variable name didn't reflect this; updated, thanks!
https://github.com/llvm/llvm-project/pull/145964
More information about the llvm-commits
mailing list