[llvm] [AArch64][CostModel] Consider the cost of const vector (PR #117539)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 11:13:35 PST 2024
================
@@ -11019,8 +11039,6 @@ BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals,
bool NeedToShuffleReuses = !E->ReuseShuffleIndices.empty();
if (E->isGather()) {
- if (allConstant(VL))
- return 0;
----------------
alexey-bataev wrote:
Check RISCVTargetTransformInfo.cpp, RISCVTTIImpl::getArithmeticInstrCost function. It has lambda `getConstantMatCost` which is called if Op1Info.isConstant() is true or Op2Info.isConstant() is true to add the constants materialization costs, if operands are constants
https://github.com/llvm/llvm-project/pull/117539
More information about the llvm-commits
mailing list