diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-12-28 13:52:52 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-12-28 13:52:52 +0000 |
commit | b6d52b8b645057f51925bb455b09d01e32298be4 (patch) | |
tree | 0aed449c412f7c78242c57fc1ab099cee759dd8e | |
parent | 110442d8a0757e9e85163582481c2da8301d014a (diff) | |
download | bcm5719-llvm-b6d52b8b645057f51925bb455b09d01e32298be4.tar.gz bcm5719-llvm-b6d52b8b645057f51925bb455b09d01e32298be4.zip |
Cast away "comparison between signed and unsigned integer" warnings.
llvm-svn: 122598
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 9 | ||||
-rw-r--r-- | llvm/lib/MC/TargetAsmBackend.cpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index fb51fa5315b..030d61a651b 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -71,8 +71,9 @@ static bool ValueDominatesPHI(Value *V, PHINode *P, const DominatorTree *DT) { /// Also performs the transform "(A op' B) op C" -> "(A op C) op' (B op C)". /// Returns the simplified value, or null if no simplification was performed. static Value *ExpandBinOp(unsigned Opcode, Value *LHS, Value *RHS, - unsigned OpcodeToExpand, const TargetData *TD, + unsigned OpcToExpand, const TargetData *TD, const DominatorTree *DT, unsigned MaxRecurse) { + Instruction::BinaryOps OpcodeToExpand = (Instruction::BinaryOps)OpcToExpand; // Recursion is always used, so bail out at once if we already hit the limit. if (!MaxRecurse--) return 0; @@ -133,8 +134,9 @@ static Value *ExpandBinOp(unsigned Opcode, Value *LHS, Value *RHS, /// OpCodeToExtract is Mul then this tries to turn "(A*B)+(A*C)" into "A*(B+C)". /// Returns the simplified value, or null if no simplification was performed. static Value *FactorizeBinOp(unsigned Opcode, Value *LHS, Value *RHS, - unsigned OpcodeToExtract, const TargetData *TD, + unsigned OpcToExtract, const TargetData *TD, const DominatorTree *DT, unsigned MaxRecurse) { + Instruction::BinaryOps OpcodeToExtract = (Instruction::BinaryOps)OpcToExtract; // Recursion is always used, so bail out at once if we already hit the limit. if (!MaxRecurse--) return 0; @@ -201,10 +203,11 @@ static Value *FactorizeBinOp(unsigned Opcode, Value *LHS, Value *RHS, /// SimplifyAssociativeBinOp - Generic simplifications for associative binary /// operations. Returns the simpler value, or null if none was found. -static Value *SimplifyAssociativeBinOp(unsigned Opcode, Value *LHS, Value *RHS, +static Value *SimplifyAssociativeBinOp(unsigned Opc, Value *LHS, Value *RHS, const TargetData *TD, const DominatorTree *DT, unsigned MaxRecurse) { + Instruction::BinaryOps Opcode = (Instruction::BinaryOps)Opc; assert(Instruction::isAssociative(Opcode) && "Not an associative operation!"); // Recursion is always used, so bail out at once if we already hit the limit. diff --git a/llvm/lib/MC/TargetAsmBackend.cpp b/llvm/lib/MC/TargetAsmBackend.cpp index b13aa1d97c6..19275574253 100644 --- a/llvm/lib/MC/TargetAsmBackend.cpp +++ b/llvm/lib/MC/TargetAsmBackend.cpp @@ -31,7 +31,7 @@ TargetAsmBackend::getFixupKindInfo(MCFixupKind Kind) const { { "FK_PCRel_8", 0, 64, MCFixupKindInfo::FKF_IsPCRel } }; - assert(Kind <= sizeof(Builtins) / sizeof(Builtins[0]) && + assert((size_t)Kind <= sizeof(Builtins) / sizeof(Builtins[0]) && "Unknown fixup kind"); return Builtins[Kind]; } |