[llvm] [CostModel][AArch64] Make extractelement, with fmul user, free whenev… (PR #111479)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 04:52:45 PST 2024
================
@@ -3145,12 +3153,16 @@ InstructionCost AArch64TTIImpl::getCFInstrCost(unsigned Opcode,
return 0;
}
-InstructionCost AArch64TTIImpl::getVectorInstrCostHelper(const Instruction *I,
- Type *Val,
- unsigned Index,
- bool HasRealUse) {
+InstructionCost AArch64TTIImpl::getVectorInstrCostHelper(
+ std::variant<const Instruction *, const unsigned> InstOrOpcode, Type *Val,
----------------
sushgokh wrote:
You really cant merge the code for instruction and opcode, atleast for the patch, because the change wont be reflected in the cost-model tests.
1. When `opcode!=null` , less information is available and we bail out early in general.
2. When `I!=null`, more analysis needs to be done.
I will keep seperate `instruction` and `opcode` parameter as you say.
https://github.com/llvm/llvm-project/pull/111479
More information about the llvm-commits
mailing list