[llvm] [AArch64][CostModel] Consider the cost of const vector (PR #117539)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 06:14:48 PST 2024
================
@@ -13479,6 +13501,56 @@ InstructionCost BoUpSLP::getGatherCost(ArrayRef<Value *> VL, bool ForPoisonSrc,
Cost += TTI->getShuffleCost(
TTI::SK_InsertSubvector, VecTy, std::nullopt, CostKind,
I * ScalarTyNumElements, cast<FixedVectorType>(ScalarTy));
+ } else if (allConstant(VL)) {
+ auto IsAllowedScalarTy = [&](const Type *T) {
+ return T->isFloatTy() || T->isDoubleTy() || T->isIntegerTy();
+ };
----------------
alexey-bataev wrote:
It should just call TTI getConstantMaterializationCost, nothing else
https://github.com/llvm/llvm-project/pull/117539
More information about the llvm-commits
mailing list