[llvm] r205949 - ARM64: add an explicit cast to silence a silly warning
Saleem Abdulrasool
compnerd at compnerd.org
Wed Apr 9 19:48:10 PDT 2014
Author: compnerd
Date: Wed Apr 9 21:48:10 2014
New Revision: 205949
URL: http://llvm.org/viewvc/llvm-project?rev=205949&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/ARM64/ARM64TargetTransformInfo.cpp
Modified: llvm/trunk/lib/Target/ARM64/ARM64TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64TargetTransformInfo.cpp?rev=205949&r1=205948&r2=205949&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/ARM64TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/ARM64TargetTransformInfo.cpp Wed Apr 9 21:48:10 2014
@@ -227,7 +227,8 @@ unsigned ARM64TTI::getIntImmCost(unsigne
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(Intrins
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:
More information about the llvm-commits
mailing list