[PATCH] D132972: [VP] Correct the LEGALPOS for VP_STORE.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 13:17:03 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: simoll, frasercrmck, rogfer01, loralb.
Herald added subscribers: luke957, StephenFan, luismarques, s.egerton, PkmX, simoncook, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132972

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
@@ -338,7 +338,7 @@
 // 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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132972.456770.patch
Type: text/x-patch
Size: 589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220830/82d8a651/attachment.bin>


More information about the llvm-commits mailing list