[llvm] [VPlan] Expand affine AddRecs to VPInstructions (PR #209921)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 02:23:26 PDT 2026


artagnon wrote:

> I might be missing something, but I think currently all AddRecs are for loops outside the scope of VPlan, and they need to be expanded in the scope of the loop attached to the AddRec, not the vector loop?
> 
> I don't think we can do anything other than expanding them via VPExpandSCEVRecipe, as it may require inserting instructions in loops outside the scope of VPlan, like #210013?

Ah, some of them are within the vector-loop-region, like in strided-accesses.ll, and certain others may be expanded by reusing VPIRInstructions: the loops in the AddRecs themselves may be out of the scope of VPlan, but I figured out that they can be dug out from the InsertBlock passed into VPSCEVExpander. I don't think we need to use the IR expander like in #210013?

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


More information about the llvm-commits mailing list