[TTI] getExtractWithExtendCost - remove default Index = -1 value
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 27 Sep 2022 14:44:21 +0000 (15:44 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 27 Sep 2022 14:44:29 +0000 (15:44 +0100)
We currently always specify the index (even if we set it to -1), and a future patch will need to adjust this method to make it more compatible with getScalarizationOverhead

llvm/include/llvm/Analysis/TargetTransformInfo.h

index 9b8f0a9..e52381a 100644 (file)
@@ -1159,10 +1159,10 @@ public:
                    const Instruction *I = nullptr) const;
 
   /// \return The expected cost of a sign- or zero-extended vector extract. Use
-  /// -1 to indicate that there is no information about the index value.
+  /// Index = -1 to indicate that there is no information about the index value.
   InstructionCost getExtractWithExtendCost(unsigned Opcode, Type *Dst,
                                            VectorType *VecTy,
-                                           unsigned Index = -1) const;
+                                           unsigned Index) const;
 
   /// \return The expected cost of control-flow related instructions such as
   /// Phi, Ret, Br, Switch.