[llvm] [AArch64][CostModel] Consider the cost of const vector (PR #117539)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 28 01:50:35 PST 2024
================
@@ -12557,7 +12575,10 @@ InstructionCost BoUpSLP::getTreeCost(ArrayRef<Value *> VectorizedVals) {
auto *Inst = cast<Instruction>(EU.Scalar);
InstructionCost ScalarCost = TTI->getInstructionCost(Inst, CostKind);
auto OperandIsScalar = [&](Value *V) {
- if (!getTreeEntry(V)) {
+ if (auto *TE = getTreeEntry(V);
+ // All constants entry does not result in a seperate instruction.
+ // Ignore such entry.
+ !TE || (TE && allConstant(TE->Scalars))) {
----------------
sushgokh wrote:
modified the logic. No more required.
https://github.com/llvm/llvm-project/pull/117539
More information about the llvm-commits
mailing list