[llvm] [ValueTracking] Support GEPs in matchSimpleRecurrence. (PR #123518)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 08:11:44 PDT 2025


================
@@ -9134,6 +9141,13 @@ static bool matchTwoInputRecurrence(const PHINode *PN, InstTy *&Inst,
       if (LHS != PN && RHS != PN)
         continue;
 
+      Value *LR;
+      if (match(Operation, m_PtrAdd(m_Specific(PN), m_Value(LR)))) {
----------------
dtcxzyw wrote:

Move this block before `Value *LHS = Operation->getOperand(0)`.

https://github.com/llvm/llvm-project/pull/123518


More information about the llvm-commits mailing list