[PATCH] D118981: [VP] Condition in vp.select|merge not a VP mask

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 02:45:32 PST 2022


simoll created this revision.
simoll added reviewers: craig.topper, frasercrmck, rogfer01.
simoll added a project: VP.
Herald added a subscriber: dexonsmith.
simoll requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

vp.select|merge both select lanes based on a condition mask.  Unlike other VP intrinsics the lanes are defined where the condition mask is false. Hence, the condition mask in vp.select|mask is not a mask in the sense of VP intrinsics.    
By doing not treating the condition mask specially, vp.select becomes the canonical VP translation of the select instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118981

Files:
  llvm/include/llvm/IR/VPIntrinsics.def


Index: llvm/include/llvm/IR/VPIntrinsics.def
===================================================================
--- llvm/include/llvm/IR/VPIntrinsics.def
+++ llvm/include/llvm/IR/VPIntrinsics.def
@@ -344,13 +344,13 @@
 
 ///// Shuffles {
 
-// llvm.vp.select(mask,on_true,on_false,vlen)
-BEGIN_REGISTER_VP(vp_select, 0, 3, VP_SELECT, -1)
+// llvm.vp.select(cond,on_true,on_false,vlen)
+BEGIN_REGISTER_VP(vp_select, None, 3, VP_SELECT, -1)
 VP_PROPERTY_FUNCTIONAL_OPC(Select)
 END_REGISTER_VP(vp_select, VP_SELECT)
 
-// llvm.vp.merge(mask,on_true,on_false,pivot)
-BEGIN_REGISTER_VP(vp_merge, 0, 3, VP_MERGE, -1)
+// llvm.vp.merge(cond,on_true,on_false,pivot)
+BEGIN_REGISTER_VP(vp_merge, None, 3, VP_MERGE, -1)
 END_REGISTER_VP(vp_merge, VP_MERGE)
 
 BEGIN_REGISTER_VP(experimental_vp_splice, 3, 5, EXPERIMENTAL_VP_SPLICE, -1)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118981.405902.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220204/642ab526/attachment.bin>


More information about the llvm-commits mailing list