diff --git a/include/llvm/Support/DataTypes.h.in b/include/llvm/Support/DataTypes.h.in index 2ac1e1721e5..f5467b2220f 100644 --- a/include/llvm/Support/DataTypes.h.in +++ b/include/llvm/Support/DataTypes.h.in @@ -84,6 +84,9 @@ typedef signed int ssize_t; #if !defined(INT64_MAX) # define INT64_MAX 9223372036854775807LL #endif +#if !defined(INT64_MIN) +# define INT64_MIN ((-INT64_MAX)-1) +#endif #if !defined(UINT64_MAX) # define UINT64_MAX 0xffffffffffffffffULL #endif diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 6916e966949..c3a15fcc198 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -156,7 +156,7 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) { LiveInterval &RegInt = getInterval(reg); RegInt.weight += - (mop.isUse() + mop.isDef()) * pow(10.0F, loopDepth); + (mop.isUse() + mop.isDef()) * pow(10.0F, (int)loopDepth); } } ++mii;