[PATCH] D27811: [CostModel][X86] Add support for broadcast shuffle costs
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 2 01:04:10 PST 2017
delena added inline comments.
================
Comment at: lib/Analysis/CostModel.cpp:498
if (NumVecElems == Mask.size()) {
+ int BroadcastIndex = -1;
+ if (Shuffle->isSplat(&BroadcastIndex) && BroadcastIndex == 0)
----------------
I suggest to simplify the code - just one function:
static bool isZeroEltBroadcastVectorMask(SmallVectorImpl<int> &Mask) {
for (unsigned i = 0; i < Mask.size(); ++i)
if (Mask[i] > 0)
return false;
return true;
}
Repository:
rL LLVM
https://reviews.llvm.org/D27811
More information about the llvm-commits
mailing list