diff --git a/lib/Target/ARM64/ARM64TargetTransformInfo.cpp b/lib/Target/ARM64/ARM64TargetTransformInfo.cpp index 5323b8965f4..f12d1be81a1 100644 --- a/lib/Target/ARM64/ARM64TargetTransformInfo.cpp +++ b/lib/Target/ARM64/ARM64TargetTransformInfo.cpp @@ -227,7 +227,8 @@ unsigned ARM64TTI::getIntImmCost(unsigned Opcode, unsigned Idx, if (Idx == ImmIdx) { unsigned NumConstants = (BitSize + 63) / 64; unsigned Cost = ARM64TTI::getIntImmCost(Imm, Ty); - return (Cost <= NumConstants * TCC_Basic) ? TCC_Free : Cost; + return (Cost <= NumConstants * TCC_Basic) + ? static_cast(TCC_Free) : Cost; } return ARM64TTI::getIntImmCost(Imm, Ty); } @@ -252,7 +253,8 @@ unsigned ARM64TTI::getIntImmCost(Intrinsic::ID IID, unsigned Idx, if (Idx == 1) { unsigned NumConstants = (BitSize + 63) / 64; unsigned Cost = ARM64TTI::getIntImmCost(Imm, Ty); - return (Cost <= NumConstants * TCC_Basic) ? TCC_Free : Cost; + return (Cost <= NumConstants * TCC_Basic) + ? static_cast(TCC_Free) : Cost; } break; case Intrinsic::experimental_stackmap: