diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-06-12 17:56:18 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-06-12 17:56:18 +0000 |
commit | 3c890c4ad651ca5f0a52e9f4143ce8fe52ff3924 (patch) | |
tree | d34576757581417bbf38dbbf96faf0386c2c71c6 /llvm/lib/Target/X86/X86TargetTransformInfo.cpp | |
parent | 885719f02731dda9c53eb0a89784bc06918cdad7 (diff) | |
download | bcm5719-llvm-3c890c4ad651ca5f0a52e9f4143ce8fe52ff3924.tar.gz bcm5719-llvm-3c890c4ad651ca5f0a52e9f4143ce8fe52ff3924.zip |
X86: stifle GCC warning
lib/Target/X86/X86TargetTransformInfo.cpp: In member function ‘virtual unsigned int {anonymous}::X86TTI::getIntImmCost(unsigned int, unsigned int, const llvm::APInt&, llvm::Type*) const’:
lib/Target/X86/X86TargetTransformInfo.cpp:920:60: warning: enumeral and non-enumeral type in conditional expression [enabled by default]
This seems like an unhelpful warning, but there doesnt seem to be a controlling
flag, so add an explicit cast to silence the warning.
llvm-svn: 210806
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetTransformInfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp index c6f5906d661..299f9a581b8 100644 --- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp @@ -917,7 +917,9 @@ unsigned X86TTI::getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, if (Idx == ImmIdx) { unsigned NumConstants = (BitSize + 63) / 64; unsigned Cost = X86TTI::getIntImmCost(Imm, Ty); - return (Cost <= NumConstants * TCC_Basic) ? TCC_Free : Cost; + return (Cost <= NumConstants * TCC_Basic) + ? static_cast<unsigned>(TCC_Free) + : Cost; } return X86TTI::getIntImmCost(Imm, Ty); |