[llvm] [AArch64][LV][SLP] Vectorizers use getFRemInstrCost for frem costs (PR #82488)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 04:01:29 PST 2024
================
@@ -1255,6 +1255,19 @@ class TargetTransformInfo {
ArrayRef<const Value *> Args = ArrayRef<const Value *>(),
const Instruction *CxtI = nullptr) const;
+ /// Returns the cost of a vector instruction based on the assumption that frem
+ /// will be later transformed (by ReplaceWithVecLib) into a call to a
+ /// platform specific frem vector math function.
+ /// Returns the same cost as getArithmeticInstrCost when no math function is
+ /// available.
+ InstructionCost getFRemInstrCost(
----------------
RKSimon wrote:
Might it not be better to make this another getArithmeticInstrCost variant that can fall back to the default getArithmeticInstrCost implementation? That way we have less work to when we merge these back together (there will be other opcodes that benefit from LibInfo handling - int div etc.)
https://github.com/llvm/llvm-project/pull/82488
More information about the llvm-commits
mailing list