llvm.org GIT mirror llvm / 18f13c6
Mark more constants unsigned, as warned about by icc (#68). Patch by Erick Tryzelaar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81116 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan Sands 11 years ago
5 changed file(s) with 8 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
8888 MachineConstantPoolEntry(MachineConstantPoolValue *V, unsigned A)
8989 : Alignment(A) {
9090 Val.MachineCPVal = V;
91 Alignment |= 1 << (sizeof(unsigned)*CHAR_BIT-1);
91 Alignment |= 1U << (sizeof(unsigned)*CHAR_BIT-1);
9292 }
9393
9494 bool isMachineConstantPoolEntry() const {
5757 if (const ConstantInt *CI = dyn_cast(V)) {
5858 const APInt &CIV = CI->getValue();
5959 if (Val >= 0)
60 return CIV == Val;
60 return CIV == static_cast(Val);
6161 // If Val is negative, and CI is shorter than it, truncate to the right
6262 // number of bits. If it is larger, then we have to sign extend. Just
6363 // compare their negated values.
2525 //
2626 static inline unsigned ByteSwap(unsigned Var, bool Really) {
2727 if (!Really) return Var;
28 return ((Var & (255<< 0)) << 24) |
29 ((Var & (255<< 8)) << 8) |
30 ((Var & (255<<16)) >> 8) |
31 ((Var & (255<<24)) >> 24);
28 return ((Var & (255U<< 0U)) << 24U) |
29 ((Var & (255U<< 8U)) << 8U) |
30 ((Var & (255U<<16U)) >> 8U) |
31 ((Var & (255U<<24U)) >> 24U);
3232 }
3333
3434 static unsigned AddCounts(unsigned A, unsigned B) {
117117
118118 if (!add) {
119119 udTarget = 1;
120 dir = -1;
120 dir = ~0;
121121 }
122122
123123 EdgeData &linkEdgeData = g.getEdgeData(edgeItr).getHeuristicData();
644644 // }
645645 // [EBP]
646646 MFI->CreateFixedObject(-TailCallReturnAddrDelta,
647 (-1*SlotSize)+TailCallReturnAddrDelta);
647 (-1U*SlotSize)+TailCallReturnAddrDelta);
648648 }
649649
650650 if (hasFP(MF)) {