[llvm] [ValueTracking] Suport GEPs in matchSimpleRecurrence. (PR #123518)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 14:23:50 PST 2025
================
@@ -9240,6 +9262,21 @@ bool llvm::matchSimpleRecurrence(const PHINode *P, BinaryOperator *&BO,
break; // Match!
}
+ case Instruction::GetElementPtr: {
+ if (LU->getNumOperands() != 2 ||
+ !cast<GetElementPtrInst>(L)->getSourceElementType()->isIntegerTy(8))
----------------
goldsteinn wrote:
Could you just match `LU` with `m_PtrAdd`?
https://github.com/llvm/llvm-project/pull/123518
More information about the llvm-commits
mailing list