ARM64: add an explicit cast to silence a silly warning

GCC 4.8 complains with:
  warning: enumeral and non-enumeral type in conditional expression

Although this is silly and harmless in this case, add an explicit cast to
silence the warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205949 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool 2014-04-10 02:48:10 +00:00
parent d631cc4563
commit 6c66c4d2eb

View File

@ -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<unsigned>(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<unsigned>(TCC_Free) : Cost;
}
break;
case Intrinsic::experimental_stackmap: