[X86] X86TargetTransformInfo.cpp - use InstructionCost type to accumulate instruction...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 15 Jun 2022 11:20:53 +0000 (12:20 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 15 Jun 2022 11:21:01 +0000 (12:21 +0100)
llvm/lib/Target/X86/X86TargetTransformInfo.cpp

index 2adbdcb693d537a43080524e3acf8d3c2e095576..4343552fe7e5119803f5dac7ce87c7d697a328aa 100644 (file)
@@ -2623,7 +2623,7 @@ InstructionCost X86TTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
   int ISD = TLI->InstructionOpcodeToISD(Opcode);
   assert(ISD && "Invalid opcode");
 
-  unsigned ExtraCost = 0;
+  InstructionCost ExtraCost = 0;
   if (Opcode == Instruction::ICmp || Opcode == Instruction::FCmp) {
     // Some vector comparison predicates cost extra instructions.
     // TODO: Should we invert this and assume worst case cmp costs
@@ -3654,7 +3654,7 @@ InstructionCost X86TTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val,
 
   assert(Val->isVectorTy() && "This must be a vector type");
   Type *ScalarType = Val->getScalarType();
-  int RegisterFileMoveCost = 0;
+  InstructionCost RegisterFileMoveCost = 0;
 
   // Non-immediate extraction/insertion can be handled as a sequence of
   // aliased loads+stores via the stack.