[llvm] r295586 - [X86] Fix enumeral/non-enumeral conditional expression warning.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 18 16:04:30 PST 2017
Author: rksimon
Date: Sat Feb 18 18:04:30 2017
New Revision: 295586
URL: http://llvm.org/viewvc/llvm-project?rev=295586&view=rev
Log:
[X86] Fix enumeral/non-enumeral conditional expression warning.
gcc only allows you to mix enums / ints if they have the same signedness.
Modified:
llvm/trunk/lib/Target/X86/X86MacroFusion.cpp
Modified: llvm/trunk/lib/Target/X86/X86MacroFusion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MacroFusion.cpp?rev=295586&r1=295585&r2=295586&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MacroFusion.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MacroFusion.cpp Sat Feb 18 18:04:30 2017
@@ -44,10 +44,10 @@ static bool shouldScheduleAdjacent(const
FuseInc
} FuseKind;
- unsigned FirstOpcode = First ?
- First->getOpcode() : X86::INSTRUCTION_LIST_END;
- unsigned SecondOpcode = Second ?
- Second->getOpcode() : X86::INSTRUCTION_LIST_END;
+ unsigned FirstOpcode =
+ First ? First->getOpcode() : (unsigned)X86::INSTRUCTION_LIST_END;
+ unsigned SecondOpcode =
+ Second ? Second->getOpcode() : (unsigned)X86::INSTRUCTION_LIST_END;
switch (SecondOpcode) {
default:
More information about the llvm-commits
mailing list