[PATCH] D98210: [ARM] Add VREV MVE shuffle costs
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 17 12:19:37 PDT 2021
dmgreen added inline comments.
================
Comment at: llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp:1223
+ if (!Mask.empty()) {
+ std::pair<int, MVT> LT = TLI->getTypeLegalizationCost(DL, Tp);
+ if (isVREVMask(Mask, LT.second, 16) || isVREVMask(Mask, LT.second, 32) ||
----------------
RKSimon wrote:
> Add an assert that Mask is the correct width?
I'm not sure if there's a specific width this needs to be. It was designed to work with any width, under the hope they would be legalized to full vector widths and so long as each of the original masks were a vrev, the result would be a vrev (or simpler, possibly with some undef lanes).
It's only really tested with single source, non-shape changing shuffles at the moment though. And it looks like testing more than that doesn't work at the moment because they all get a unknown (-1) cost. I'll add a check that the size is an OK width and see about improving the testing to some more cases.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98210/new/
https://reviews.llvm.org/D98210
More information about the llvm-commits
mailing list