[PATCH] D92094: [CostModel]Replace FixedVectorType by VectorType in costgetIntrinsicInstrCost
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 08:19:33 PST 2020
sdesmalen added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1238
case Intrinsic::masked_scatter: {
- assert(VF.isScalar() && "Can't vectorize types here.");
- const Value *Mask = Args[3];
- bool VarMask = !isa<Constant>(Mask);
- Align Alignment = cast<ConstantInt>(Args[2])->getAlignValue();
- return thisT()->getGatherScatterOpCost(Instruction::Store,
- Args[0]->getType(), Args[1],
- VarMask, Alignment, CostKind, I);
+ if (!isa<ScalableVectorType>(RetTy)) {
+ assert(VF.isScalar() && "Can't vectorize types here.");
----------------
Can you rewrite this as:
if (isa<ScalableVectorType>(RetTy))
return BaseT::getIntrinsicInstrCost(ICA, CostKind)
so that you don't need to indent all the other lines?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92094/new/
https://reviews.llvm.org/D92094
More information about the llvm-commits
mailing list