[llvm] [InstCombine] Match intrinsic recurrences when known to be hoisted (PR #149858)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 29 02:58:30 PDT 2025
nikic wrote:
@antoniofrighetto What I had in mind is something more general along these lines: https://github.com/llvm/llvm-project/pull/151115 (I took the liberty of pushing your tests to main so that shows the diff.) This doesn't do any recurrence check upfront.
You're right that this can't handle the multi-use case. The question then would be whether handling multi-use is worth a dedicated fold. (Though possibly we could extend foldOpIntoPhi to handle this specific multi-use case, not sure...)
https://github.com/llvm/llvm-project/pull/149858
More information about the llvm-commits
mailing list