[llvm] r272539 - Fix an enumeral mismatch warning.
Haojian Wu via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 02:03:45 PDT 2016
Author: hokein
Date: Mon Jun 13 04:03:45 2016
New Revision: 272539
URL: http://llvm.org/viewvc/llvm-project?rev=272539&view=rev
Log:
Fix an enumeral mismatch warning.
Summary:
The "-Werror=enum-compare" shows that the statement is using two different enums:
enumeral mismatch in conditional expression: 'llvm::X86ISD::NodeType' vs 'llvm::ISD::NodeType'
A follow-up fix on D21235.
Reviewers: klimek
Subscribers: spatel, cfe-commits
Differential Revision: http://reviews.llvm.org/D21278
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=272539&r1=272538&r2=272539&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jun 13 04:03:45 2016
@@ -15185,12 +15185,14 @@ static SDValue LowerVSETCC(SDValue Op, c
if (SetCCOpcode == ISD::SETUEQ) {
CC0 = 3; // UNORD
CC1 = 0; // EQ
- CombineOpc = Opc == X86ISD::CMPP ? X86ISD::FOR : ISD::OR;
+ CombineOpc = Opc == X86ISD::CMPP ? static_cast<unsigned>(X86ISD::FOR) :
+ static_cast<unsigned>(ISD::OR);
} else {
assert(SetCCOpcode == ISD::SETONE);
CC0 = 7; // ORD
CC1 = 4; // NEQ
- CombineOpc = Opc == X86ISD::CMPP ? X86ISD::FAND : ISD::AND;
+ CombineOpc = Opc == X86ISD::CMPP ? static_cast<unsigned>(X86ISD::FAND) :
+ static_cast<unsigned>(ISD::AND);
}
SDValue Cmp0 = DAG.getNode(Opc, dl, VT, Op0, Op1,
More information about the llvm-commits
mailing list