================ @@ -16676,6 +16676,26 @@ static std::optional<unsigned> getCastOpcodeForDemotedOperand(unsigned Opcode, } } +/// Returns \p Cost with \p Repr as the context if every lane of \p VL that +/// \p Repr represents gives the same cost as its context, and \p Cost without +/// a context otherwise. +static InstructionCost getCostInAgreedContext( ---------------- michaelselehov wrote:
Thanks, I will move the decision into TTI. One question about the shape. I can add the scalars as a parameter of getArithmeticInstrCost, like getAltInstrCost has, which changes the signature in every target. Or I can add a separate hook with a default implementation, so only TTI, AMDGPU and SLP change. Which one do you prefer? https://github.com/llvm/llvm-project/pull/241758 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
