[X86] X86TargetTransformInfo.cpp - use InstructionCost type to accumulate instructions costs

This commit is contained in:
Simon Pilgrim 2022-06-15 12:20:53 +01:00
parent adfcdb0d0d
commit cf2072bcad
1 changed files with 2 additions and 2 deletions

View 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.