[PATCH] D133007: [RISCV] Add cost model for vector insert/extract element.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 12 12:19:57 PDT 2022
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM with one required change made. If you disagree with that change, or it doesn't work for some reason, further discussion is needed.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:757
+
+ // If vector type should be splitted, we use stack store/load to make it.
+ if (auto EltCnt = cast<VectorType>(Val)->getElementCount();
----------------
I don't follow the added code here.
For purposes of driving this review forward, can you split this bit into it's own patch? For this patch, do the following:
```
if (!isTypeLegal(Val->getType())
return BaseT::getVectorInstrCost(Opcode, Val, Index);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133007/new/
https://reviews.llvm.org/D133007
More information about the llvm-commits
mailing list