From: Craig Topper Date: Fri, 2 Sep 2022 15:04:27 +0000 (-0700) Subject: [VP] Correct LEGALPOS for more VP nodes. X-Git-Tag: upstream/17.0.6~34606 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5cf510115afd54d0f45035957a9ad0e3425bee6c;p=platform%2Fupstream%2Fllvm.git [VP] Correct LEGALPOS for more VP nodes. LEGALPOS appears to only be used by LegalizeVectorOps. It needs to point at a vector operand. Stores need to point at the second operand since the result and the first operand are MVT::Other. Reductions need to point at the second operand since the result and the first operand are scalsrs. Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D133048 --- diff --git a/llvm/include/llvm/IR/VPIntrinsics.def b/llvm/include/llvm/IR/VPIntrinsics.def index 99ec7c2..266c8b6 100644 --- a/llvm/include/llvm/IR/VPIntrinsics.def +++ b/llvm/include/llvm/IR/VPIntrinsics.def @@ -348,7 +348,7 @@ END_REGISTER_VP(vp_store, VP_STORE) // llvm.experimental.vp.strided.store(val,ptr,stride,mask,vlen) BEGIN_REGISTER_VP_INTRINSIC(experimental_vp_strided_store, 3, 4) // chain = EXPERIMENTAL_VP_STRIDED_STORE chain,val,base,offset,stride,mask,evl -BEGIN_REGISTER_VP_SDNODE(EXPERIMENTAL_VP_STRIDED_STORE, 0, experimental_vp_strided_store, 5, 6) +BEGIN_REGISTER_VP_SDNODE(EXPERIMENTAL_VP_STRIDED_STORE, 1, experimental_vp_strided_store, 5, 6) HELPER_MAP_VPID_TO_VPSD(experimental_vp_strided_store, EXPERIMENTAL_VP_STRIDED_STORE) VP_PROPERTY_MEMOP(1, 0) END_REGISTER_VP(experimental_vp_strided_store, EXPERIMENTAL_VP_STRIDED_STORE) @@ -356,7 +356,7 @@ END_REGISTER_VP(experimental_vp_strided_store, EXPERIMENTAL_VP_STRIDED_STORE) // llvm.vp.scatter(ptr,val,mask,vlen) BEGIN_REGISTER_VP_INTRINSIC(vp_scatter, 2, 3) // chain = VP_SCATTER chain,val,base,indices,scale,mask,evl -BEGIN_REGISTER_VP_SDNODE(VP_SCATTER, -1, vp_scatter, 5, 6) +BEGIN_REGISTER_VP_SDNODE(VP_SCATTER, 1, vp_scatter, 5, 6) HELPER_MAP_VPID_TO_VPSD(vp_scatter, VP_SCATTER) VP_PROPERTY_FUNCTIONAL_INTRINSIC(masked_scatter) VP_PROPERTY_MEMOP(1, 0) @@ -399,7 +399,7 @@ END_REGISTER_VP(vp_gather, VP_GATHER) "The internal helper macro HELPER_REGISTER_REDUCTION_VP is already defined!" #endif #define HELPER_REGISTER_REDUCTION_VP(VPID, VPSD, INTRIN) \ - BEGIN_REGISTER_VP(VPID, 2, 3, VPSD, -1) \ + BEGIN_REGISTER_VP(VPID, 2, 3, VPSD, 1) \ VP_PROPERTY_FUNCTIONAL_INTRINSIC(INTRIN) \ VP_PROPERTY_REDUCTION(0, 1) \ END_REGISTER_VP(VPID, VPSD) @@ -462,10 +462,10 @@ HELPER_REGISTER_REDUCTION_VP(vp_reduce_fmin, VP_REDUCE_FMIN, #endif #define HELPER_REGISTER_REDUCTION_SEQ_VP(VPID, VPSD, SEQ_VPSD, INTRIN) \ BEGIN_REGISTER_VP_INTRINSIC(VPID, 2, 3) \ - BEGIN_REGISTER_VP_SDNODE(VPSD, -1, VPID, 2, 3) \ + BEGIN_REGISTER_VP_SDNODE(VPSD, 1, VPID, 2, 3) \ VP_PROPERTY_REDUCTION(0, 1) \ END_REGISTER_VP_SDNODE(VPSD) \ - BEGIN_REGISTER_VP_SDNODE(SEQ_VPSD, -1, VPID, 2, 3) \ + BEGIN_REGISTER_VP_SDNODE(SEQ_VPSD, 1, VPID, 2, 3) \ HELPER_MAP_VPID_TO_VPSD(VPID, SEQ_VPSD) \ VP_PROPERTY_REDUCTION(0, 1) \ END_REGISTER_VP_SDNODE(SEQ_VPSD) \