[llvm] [InstCombine] Match intrinsic recurrences when known to be hoisted (PR #149858)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 29 03:38:00 PDT 2025
antoniofrighetto wrote:
@nikic Oh, I see that now, thanks; that indeed looks like a nice extension. Both using the recurrence helper and foldOpIntoPhi seem like cheap checks, so I assume the choice here mostly boils down to having less code around. If we go with your approach, I may take a look into supporting the specific multi-use case (the second run on the benchmark suite shows some nice little improvements with multi-use phi, suggesting it could indeed be worthwhile to have it). My only thought is that foldBinaryIntrinsicRecurrence doesn't look particularly invasive and, considering we have already some matchSimpleRecurrence folds around, it might make sense to have a dedicated fold for intrinsic recurrences as well.
https://github.com/llvm/llvm-project/pull/149858
More information about the llvm-commits
mailing list