[PATCH] D57504: RFC: Prototype & Roadmap for vector predication in LLVM

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 00:52:26 PST 2019


simoll marked an inline comment as done.
simoll added inline comments.
Herald added a subscriber: luismarques.


================
Comment at: llvm/docs/LangRef.rst:15283-15300
+.. _int_vp_select:
+
+'``llvm.vp.select.*``' Intrinsics
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
----------------
rkruppe wrote:
> simoll wrote:
> > > @rkruppe 
> > > [..] My main point was just that the existing select instruction is not sufficient as the second operation, for essentially the same reason why the VP intrinsics have an EVL argument instead of just the mask. Creating a VP equivalent of select (as already sketched in the other thread) resolves that concern just as well.
> > I agree. The prototype has defined such an `llvm.vp.select` from the get-go.
> Oops, missed that / forgot about it. Sorry for the noise.
> 
> Is there a reason why it's not in the "integer slice" patch? It's not integer-specific, but it seems to fit even less into the other slices.
I wanted to keep the integer patch concise for one. Also, having played around with this for a while now, i think that the signature of `vp.select` should be:

   llvm.vp.select(<W x i1> %m, %onTrue, %onFalse, i32 %threshold, i32 vlen %evl)

meaning that values from %onTrue are selected where %m is true and the lane index is below %threshold. %onFalse is selected otherwise. Lane indices greater-equal %evl are undef as ever. In short: there is just one "merge" operation and no more separate `vp.compose`.





Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57504/new/

https://reviews.llvm.org/D57504





More information about the llvm-commits mailing list