[llvm] [LoopVectorize] Enable vectorisation of early exit loops with live-outs (PR #120567)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 03:01:39 PST 2025


fhahn wrote:

> > Just double checking, looking at the latest version it is effectively doing an extract of the last active lane, right?
> 
> Hi @fhahn, no it extracts the first active lane by counting the number of trailing zeroes in the mask that triggered the exit. So it's calculating the element corresponding to the first true value in the mask. If it was extracting the last active lane then it would be VF - number of leading zeroes.

Yeah I meant just that it only extracts from last valid lane of the vector IV, not how exactly that is computed (vs computing the end value based on the IV end value)

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


More information about the llvm-commits mailing list