[Libre-soc-dev] Fwd: [PATCH] D57504: RFC: Prototype & Roadmap for vector predication in LLVM

Jacob Lifshay programmerjake at gmail.com
Fri Aug 28 14:27:40 BST 2020


On Fri, Aug 28, 2020, 06:00 lkcl <luke.leighton at gmail.com> wrote:

> jacob are you following these,


not anymore, I was getting too much email from LLVM to keep up

do you happen to know what
> get.active.lane.mask is about and how it works?
>

yeah, it's pretty simple:
https://github.com/llvm/llvm-project/blob/248a67f1445d716cd18a588db35328d1f5b501c8/llvm/docs/LangRef.rst#L16899

the code:
%m = @llvm.get.active.lane.mask(%base, %n)
is basically the equivalent of the following python:
m = [base + i < n for i in range(...)]
where base is an unsigned integer; n must be > 0 and is a hint to the
backend of how many times the loop that was vectorized executes

Jacob


More information about the Libre-soc-dev mailing list