artagnon wrote: Figured out several things and updated the commit message: we expand AddRecs to VPInstructions exactly when it is safe, and fall back to the IR expander when the AddRec refers to a loop no longer in the Plan. https://github.com/llvm/llvm-project/pull/209921