[llvm] [AArch64][LV][SLP] Vectorizers use getFRemInstrCost for frem costs (PR #82488)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 08:51:07 PST 2024


================
@@ -1255,6 +1255,18 @@ 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.
+  /// If unsupported, it will return cost using getArithmeticInstrCost.
+  InstructionCost getFRemInstrCost(
+      const TargetLibraryInfo *TLI, unsigned Opcode, Type *Ty,
----------------
paulwalker-arm wrote:

I suppose the `Opcode` parameter should be removed given the function is specific to `FRem`.

https://github.com/llvm/llvm-project/pull/82488


More information about the llvm-commits mailing list