[all-commits] [llvm/llvm-project] 7fb8a4: New intrinsic @llvm.get.active.lane.mask()
sjoerdmeijer via All-commits
all-commits at lists.llvm.org
Fri May 29 00:53:32 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 7fb8a40e5220d6d4efa14c15f92b6f28ba1b18f7
https://github.com/llvm/llvm-project/commit/7fb8a40e5220d6d4efa14c15f92b6f28ba1b18f7
Author: Sjoerd Meijer <sjoerd.meijer at arm.com>
Date: 2020-05-29 (Fri, 29 May 2020)
Changed paths:
M llvm/docs/LangRef.rst
M llvm/include/llvm/IR/Intrinsics.td
M llvm/lib/IR/Verifier.cpp
A llvm/test/Verifier/get-active-lane-mask.ll
Log Message:
-----------
New intrinsic @llvm.get.active.lane.mask()
This is split off from D79100 and:
- adds a intrinsic description/definition for @llvm.get.active.lane.mask(), and
- describe its semantics in LangRef.
As described (in more detail) in its LangRef section, it is semantically
equivalent to an icmp with the vector induction variable and the back-edge
taken count, and generates a mask of active/inactive vector lanes.
It will have several use cases. First, it will be used by the
ExpandVectorPredication pass for the VP intrinsics, to expand VP intrinsics for
scalable vectors on targets that do not support the `%evl` parameter, see
D78203.
Also, this is part of, and essential for our ARM MVE tail-predication story:
- this intrinsic will be emitted by the LoopVectorizer in D79100, when
the scalar epilogue is tail-folded into the vector body. This new intrinsic
will generate the predicate for the masked loads/stores, and it takes the
back-edge taken count as an argument. The back-edge taken count represents the
number of elements processed by the loop, which we need to setup MVE
tail-predication.
- Emitting the intrinsic is controlled by a new TTI hook, see D80597.
- We pick up this new intrinsic in an ARM MVETailPredication backend pass, see
D79175, and convert it to a MVE target specific intrinsic/instruction to
create a tail-predicated loop.
Differential Revision: https://reviews.llvm.org/D80596
More information about the All-commits
mailing list