[llvm] acc55ad - [VP] Condition in vp.select|merge not a VP mask

Simon Moll via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 09:19:34 PST 2022


Author: Simon Moll
Date: 2022-02-15T18:18:08+01:00
New Revision: acc55adbc1f6fbe93735afb9115214c4fe495bcb

URL: https://github.com/llvm/llvm-project/commit/acc55adbc1f6fbe93735afb9115214c4fe495bcb
DIFF: https://github.com/llvm/llvm-project/commit/acc55adbc1f6fbe93735afb9115214c4fe495bcb.diff

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

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.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D118981

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/VPIntrinsics.def b/llvm/include/llvm/IR/VPIntrinsics.def
index bdaea60ec2eda..004bd8abcdb7a 100644
--- a/llvm/include/llvm/IR/VPIntrinsics.def
+++ b/llvm/include/llvm/IR/VPIntrinsics.def
@@ -380,13 +380,13 @@ HELPER_REGISTER_REDUCTION_SEQ_VP(vp_reduce_fmul, VP_REDUCE_FMUL,
 
 ///// 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)


        


More information about the llvm-commits mailing list