diff options
author | Zachary Turner <zturner@google.com> | 2017-12-14 22:07:03 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-12-14 22:07:03 +0000 |
commit | ece9b23b5453aaaa4273af66b442a92ecd8bf665 (patch) | |
tree | 36759dfde55d19b4629e4a7f622639bce8bbc7fc /lib/Analysis | |
parent | 7034870f30320d6fbc74effff539d946018cd00a (diff) |
Fix many -Wsign-compare and -Wtautological-constant-compare warnings.
Most of the -Wsign-compare warnings are due to the fact that
enums are signed by default in the MS ABI, while the
tautological comparison warnings trigger on x86 builds where
sizeof(size_t) is 4 bytes, so N > numeric_limits<unsigned>::max()
is always false.
Differential Revision: https://reviews.llvm.org/D41256
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/InstructionSimplify.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp index a95f9ace37c..3ce1281743c 100644 --- a/lib/Analysis/InstructionSimplify.cpp +++ b/lib/Analysis/InstructionSimplify.cpp @@ -327,7 +327,7 @@ static Value *ThreadBinOpOverSelect(Instruction::BinaryOps Opcode, Value *LHS, // Check that the simplified value has the form "X op Y" where "op" is the // same as the original operation. Instruction *Simplified = dyn_cast<Instruction>(FV ? FV : TV); - if (Simplified && Simplified->getOpcode() == Opcode) { + if (Simplified && Simplified->getOpcode() == unsigned(Opcode)) { // The value that didn't simplify is "UnsimplifiedLHS op UnsimplifiedRHS". // We already know that "op" is the same as for the simplified value. See // if the operands match too. If so, return the simplified value. |