summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FastISel.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-08-08 22:47:49 +0000
committerRui Ueyama <ruiu@google.com>2014-08-08 22:47:49 +0000
commit4c956fe12993d418dc49bc1eeb90229098039104 (patch)
treef73f606fcf5854edb7650901384d1930f2198f5b /llvm/lib/Target/X86/X86FastISel.cpp
parent90490af21d42cc8142812ac91813828b62f0862d (diff)
downloadbcm5719-llvm-4c956fe12993d418dc49bc1eeb90229098039104.tar.gz
bcm5719-llvm-4c956fe12993d418dc49bc1eeb90229098039104.zip
[FastISel][X86] Silence -Wenum-compare warning
llvm-svn: 215253
Diffstat (limited to 'llvm/lib/Target/X86/X86FastISel.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index db3a4fdc9cc..a5bbf7202ef 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -2382,11 +2382,15 @@ bool X86FastISel::FastLowerIntrinsicCall(const IntrinsicInst *II) {
switch (II->getIntrinsicID()) {
default: llvm_unreachable("Unexpected intrinsic!");
case Intrinsic::sadd_with_overflow:
- BaseOpc = UseIncDec ? X86ISD::INC : ISD::ADD; CondOpc = X86::SETOr; break;
+ BaseOpc = UseIncDec ? unsigned(X86ISD::INC) : unsigned(ISD::ADD);
+ CondOpc = X86::SETOr;
+ break;
case Intrinsic::uadd_with_overflow:
BaseOpc = ISD::ADD; CondOpc = X86::SETBr; break;
case Intrinsic::ssub_with_overflow:
- BaseOpc = UseIncDec ? X86ISD::DEC : ISD::SUB; CondOpc = X86::SETOr; break;
+ BaseOpc = UseIncDec ? unsigned(X86ISD::DEC) : unsigned(ISD::SUB);
+ CondOpc = X86::SETOr;
+ break;
case Intrinsic::usub_with_overflow:
BaseOpc = ISD::SUB; CondOpc = X86::SETBr; break;
case Intrinsic::smul_with_overflow:
OpenPOWER on IntegriCloud