[llvm] [IndVarSimplify] Add support to simplify pointer IV to integer IV (PR #209413)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 01:07:34 PDT 2026


msolk wrote:

@preames Thank you for taking the time to consider this PR.

We’ve seen meaningful benefits from this transformation in our downstream compiler, but we are not seeing the same opportunities in upstream. Sorry we didn’t confirm that earlier.

This change reduces the perceived cost of vectorization for certain pointer induction-variable loops. One example is [here](https://godbolt.org/z/Y56xzvP1n). We expect it to enable vectorization in cases that previously looked too expensive.

We also believe that extending this transformation to nested loops would increase the chances of triggering other loop optimizations, such as InductiveRangeCheckElimination and LoopFlatten that currently require integer IV.

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


More information about the llvm-commits mailing list