[llvm] 8dce350 - [VP] Correct the LEGALPOS for VP_STORE.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 11:15:57 PDT 2022


Author: Craig Topper
Date: 2022-08-31T11:15:47-07:00
New Revision: 8dce3507a08f3e6b0c37bf90413534a4432fa6bf

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

LOG: [VP] Correct the LEGALPOS for VP_STORE.

VP_STORE has a Chain for operand 0, so the LEGALPOS should be 1.

VP_STORE is always considered Legal for MVT::Other. So I suspect this
was causing vp_store to be ignored by LegalizeVectorOps and instead
handled in LegalizeDAG.

VP_LOAD is Custom expanded in LegalizeVectorOps for RISC-V.

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

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 969f049afee55..99ec7c28fa4c8 100644
--- a/llvm/include/llvm/IR/VPIntrinsics.def
+++ b/llvm/include/llvm/IR/VPIntrinsics.def
@@ -338,7 +338,7 @@ END_REGISTER_VP_INTRINSIC(vp_icmp)
 // llvm.vp.store(val,ptr,mask,vlen)
 BEGIN_REGISTER_VP_INTRINSIC(vp_store, 2, 3)
 // chain = VP_STORE chain,val,base,offset,mask,evl
-BEGIN_REGISTER_VP_SDNODE(VP_STORE, 0, vp_store, 4, 5)
+BEGIN_REGISTER_VP_SDNODE(VP_STORE, 1, vp_store, 4, 5)
 HELPER_MAP_VPID_TO_VPSD(vp_store, VP_STORE)
 VP_PROPERTY_FUNCTIONAL_OPC(Store)
 VP_PROPERTY_FUNCTIONAL_INTRINSIC(masked_store)


        


More information about the llvm-commits mailing list