[PATCH] D91532: [NFC][CostModel]Extend class IntrinsicCostAttributes to use ElementCount Type
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 07:08:43 PST 2020
sdesmalen added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1153
+ ElementCount RetVF =
+ (RetTy->isVectorTy() ? cast<FixedVectorType>(RetTy)->getElementCount()
+ : ElementCount::getFixed(1));
----------------
This can now check for VectorType.
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1266
+ assert(VF.isScalar() || !OpTy->isVectorTy());
+ Types.push_back(VF.isScalar() ? OpTy : FixedVectorType::get(
+ OpTy, VF.getKnownMinValue()));
----------------
This can now use `VectorType::get(OpTy, VF)`
================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1271
+ if (VF.isVector() && !RetTy->isVoidTy())
+ RetTy = FixedVectorType::get(RetTy, VF.getKnownMinValue());
----------------
This can use VectorType.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91532/new/
https://reviews.llvm.org/D91532
More information about the llvm-commits
mailing list