[llvm] [VPlan] Optimize more IV increment exit users by using a map (PR #147016)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 6 22:17:56 PDT 2025


arcbbb wrote:

> What are the cases that we currently miss and catch with that? Could we detect them differently? Having a map seems like it may be a bit fragile, as the referenced VPValues may be replaced/removed in between.

The pattern matching expects widen induction increments to be in canonical form (add/fadd/sub/fsub/gep iv-phi, iv-step).
Induction increments which are SCEVConstant or loop-invariant or the order of phi need to be simplified to match the form.

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


More information about the llvm-commits mailing list