[PATCH] D105351: [VP] Declaration and docs for vp.select intrinsic
Roger Ferrer Ibanez via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 2 03:44:34 PDT 2021
rogfer01 added a comment.
For the case of pass-thru, does it make sense to give it a different name like `vp.overwrite` / `vp.insert` / `vp.update` / `vp.merge` (in lack of better names). When there is pass through, this intrinsic looks to me it can be understood as first taking the whole `on_false` value and then, to build the result, selectively (as defined by the mask below the EVL) replacing elements with the corresponding values from `on_true`.
Then the case without pass-thru I'd call it `vp.select` because this does seem the obvious extension from the IR instruction `select` to VPred.
I understood from an earlier VPred sync call that you already had considered this scheme with two intrinsics and it had some drawbacks, right? Mind to elaborate? Perhaps a vectorizer will mostly always use `vp.merge` and never `vp.select` so the latter is less interesting to have?
================
Comment at: llvm/docs/LangRef.rst:17747
+
+If ``tail_passthru == 1`` the intrinsic behaves as follows.
+The pivot creates a mask, %pivot, with all elements ``0 <= i <
----------------
I might be reading this wrong, shouldn't it be
```
The pivot creates a mask, %pivotMask, with all elements ``0 <= i < %pivot`` set to ``1``
```
(i.e. swap `%pivot` and `%pivotMask` occurrences)
================
Comment at: llvm/docs/LangRef.rst:17780
+ %evlMask = icmp lgt i32 <0, 1, 2, 3> %lane_idx
+ %M = and <4 x i1> %mask, %evlMask
+ %also.r = select <4 x i1> %m, <4 x i32> %on_true, <4 x i32> %on_false
----------------
I think this should be `%m` (instead of `%M`)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105351/new/
https://reviews.llvm.org/D105351
More information about the llvm-commits
mailing list