[PATCH] D27811: [CostModel][X86] Add support for broadcast shuffle costs

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 09:24:11 PST 2016

mkuper added inline comments.

Comment at: lib/Analysis/CostModel.cpp:93
+static bool isBroadcastVectorMask(SmallVectorImpl<int> &Mask) {
+  for (unsigned i = 0, MaskSize = Mask.size(); i < MaskSize; ++i)
We already have this helper in CGP (that version also checks if you're splatting *any* element, not just element 0.)
Maybe make it common? Not entirely sure what the appropriate place for it yes, though. Would it make sense for CGP to use CostModel?



More information about the llvm-commits mailing list