[llvm] [LV] Run VPlan licm late in executePlan (PR #181122)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 03:56:18 PST 2026


artagnon wrote:

> 2. Seems all RISC-V (and at least some AArch64) are `vscale`-related. Any chance we should be emitting better code from the start without relying on a separate `LICM`?

It would unnecessarily complicate the implementation of patches like https://github.com/llvm/llvm-project/pull/172372 -- the transform runs in executePlan, because it needs to come after convertToConcreteRecipes. Of course, ideally and in the long term, we want to keep executePlan as simple as possible, as it runs after VPlan-costing.

> 3. See inline comment.

There are more opportunities introduced by transforms between the previous licm call and this one (particularly, the transforms in executePlan).

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


More information about the llvm-commits mailing list