[all-commits] [llvm/llvm-project] 1de3dc: [LV] Bail out early if BTC+1 wraps.

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Jan 14 14:08:03 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1de3dc7d23dd6b856efad3a3a04f2396328726d7
      https://github.com/llvm/llvm-project/commit/1de3dc7d23dd6b856efad3a3a04f2396328726d7
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2025-01-14 (Tue, 14 Jan 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/loopvectorize_pr33804_double.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product-epilogue.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product-mixed.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product-neon.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-dot-product.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-no-dotprod.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/store-costs-sve.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/sve-widen-extractvalue.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/vplan-printing.ll
    M llvm/test/Transforms/LoopVectorize/Hexagon/maximum-vf-crash.ll
    M llvm/test/Transforms/LoopVectorize/X86/cost-constant-known-via-scev.ll
    M llvm/test/Transforms/LoopVectorize/X86/cost-model.ll
    M llvm/test/Transforms/LoopVectorize/X86/drop-poison-generating-flags.ll
    M llvm/test/Transforms/LoopVectorize/X86/interleave-cost.ll
    M llvm/test/Transforms/LoopVectorize/X86/replicate-uniform-call.ll
    A llvm/test/Transforms/LoopVectorize/epilog-vectorization-vector-trip-count-zero.ll
    M llvm/test/Transforms/LoopVectorize/first-order-recurrence-chains.ll
    M llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
    M llvm/test/Transforms/LoopVectorize/induction.ll
    M llvm/test/Transforms/LoopVectorize/interleave-and-scalarize-only.ll
    M llvm/test/Transforms/LoopVectorize/is_fpclass.ll
    M llvm/test/Transforms/LoopVectorize/optimal-epilog-vectorization.ll
    M llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll
    M llvm/test/Transforms/LoopVectorize/scev-predicate-reasoning.ll
    M llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge-vf1.ll

  Log Message:
  -----------
  [LV] Bail out early if BTC+1 wraps.

Currently we fail to detect the case where BTC + 1 wraps, i.e. the
vector trip count is 0, In those cases, the minimum iteration count
check will fail, and the vector code will never be executed.

Explicitly check for this condition in computeMaxVF and avoid trying to
vectorize alltogether.

Note that a number of tests needed to be updated, because the vector
loop would never be executed given the input IR.

Fixes https://github.com/llvm/llvm-project/issues/122558.



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