diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 53d3ab5f048..128b19778fc 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -732,7 +732,7 @@ static bool useSIToFPInst(ConstantFP &InitV, ConstantFP &ExitV, // If the iteration range can be handled by SIToFPInst then use it. APInt Max = APInt::getSignedMaxValue(32); - if (Max.getZExtValue() > abs(intEV - intIV)) + if (Max.getZExtValue() > static_cast(abs(intEV - intIV))) return true; return false;