[all-commits] [llvm/llvm-project] e5263e: [LV][NFC] Clean up tail-folding check for early-ex...

Shih-Po Hung via All-commits all-commits at lists.llvm.org
Thu Apr 17 19:57:32 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5263e3ec83cf662f945a067ffc83e2ed76d9aed
      https://github.com/llvm/llvm-project/commit/e5263e3ec83cf662f945a067ffc83e2ed76d9aed
  Author: Shih-Po Hung <shihpo.hung at sifive.com>
  Date:   2025-04-18 (Fri, 18 Apr 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

  Log Message:
  -----------
  [LV][NFC] Clean up tail-folding check for early-exit loops (#133931)

This patch moves the check for a single latch exit from computeMaxVF()
to LoopVectorizationLegality::canFoldTailByMasking(), as it duplicates
the logic when foldTailByMasking() returns false.

It also updates the NoScalarEpilogueNeeded logic to return false for
loops that are neither single-latch-exit nor early-exit. This avoids
applying tail-folding in unsupported cases and prevents triggering
assertions during analysis.



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