[all-commits] [llvm/llvm-project] 315a38: [VPlan] Take wide induction wrap flags from the in...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Sep 26 13:02:49 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 315a38a1ef3825e4e7ebe188353b4c5329751453
      https://github.com/llvm/llvm-project/commit/315a38a1ef3825e4e7ebe188353b4c5329751453
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-09-26 (Sat, 26 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
    M llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
    M llvm/lib/Transforms/Vectorize/VPlanUtils.h
    M llvm/test/Transforms/LoopVectorize/AArch64/epilog-vectorization-widen-inductions.ll
    M llvm/test/Transforms/LoopVectorize/X86/pr36524.ll
    M llvm/test/Transforms/LoopVectorize/induction-wrapflags.ll
    M llvm/test/Transforms/LoopVectorize/induction.ll
    M llvm/test/Transforms/LoopVectorize/pr30654-phiscev-sext-trunc.ll
    M llvm/test/Transforms/LoopVectorize/pr35773.ll
    M llvm/test/Transforms/LoopVectorize/predicated-inductions.ll
    M llvm/test/Transforms/LoopVectorize/single-value-blend-phis.ll

  Log Message:
  -----------
  [VPlan] Take wide induction wrap flags from the increment of the phi. (#226726)

The binary operator of an integer InductionDescriptor is the incoming
value from the latch, which is not required to have the phi as operand.
E.g. for

  %x = add i32 %iv, 5
  %iv.next = add nuw nsw i32 %x, 1

the flags only apply to %x + 1, while the induction step is 6, and %iv +
6 may wrap even though %iv.next does not. Determine the wrap flags from
the increment of the header phi instead, and only if it adds to or
subtracts from the phi directly.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list