[all-commits] [llvm/llvm-project] c4ff7a: [LV] Use SCEV loop-uniformity for outer-loop branc...

Ming Yan via All-commits all-commits at lists.llvm.org
Wed Sep 30 20:49:01 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4ff7a767a271c02dd37312999c80f404219dd30
      https://github.com/llvm/llvm-project/commit/c4ff7a767a271c02dd37312999c80f404219dd30
  Author: Ming Yan <nexming7 at gmail.com>
  Date:   2026-10-01 (Thu, 01 Oct 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
    M llvm/test/Transforms/LoopVectorize/explicit_outer_nonuniform_inner.ll
    M llvm/test/Transforms/LoopVectorize/explicit_outer_uniform_diverg_branch.ll
    M llvm/test/Transforms/LoopVectorize/outer_loop_early_exit.ll
    M llvm/test/Transforms/LoopVectorize/outer_loop_inner_loop_exits.ll

  Log Message:
  -----------
  [LV] Use SCEV loop-uniformity for outer-loop branch legality (#199632)

This patch refactors the outer-loop vectorization branch legality checks
to reason about conditional branches directly instead of using the old
recursive inner-loop shape check.

The new check allows conditional branches when their condition is
either:

- loop-invariant with respect to the vectorized outer loop, or
- a compare whose operands are both SCEV loop-uniform with respect to
the vectorized outer loop.

Divergent conditional branches are still rejected, now with a more
specific diagnostic.



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