[llvm] [VPlan] Expand WideCanIV into executable recipes (PR #191219)

Madhur Amilkanthwar via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 09:19:32 PDT 2026


madhur13490 wrote:

Nice cleanup — eliminating `VPUnrollPartAccessor` makes the recipe much easier to follow.

One small follow-up while we're touching this code: the `vec.iv` add can carry `nuw`. The canonical IV is already `nuw`, and `VFxPart` is emitted `{nuw, nsw}` by the unroller, so the sum stays in range.

 `VPBuilder::createAdd` already takes a trailing `WrapFlags` argument, so this is a one-token change:

 ```cpp
 VPValue *CanVecIV = Builder.createAdd(
     CanIV, Step, DebugLoc::getCompilerGenerated(), "vec.iv",
     {/*HasNUW=*/true, /*HasNSW=*/false});
 ```

 Happy to send this as a small follow-up once this lands, or fold it in here — whichever you prefer.


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


More information about the llvm-commits mailing list