Index: llvm/lib/FuzzMutate/IRMutator.cpp =================================================================== --- llvm/lib/FuzzMutate/IRMutator.cpp +++ llvm/lib/FuzzMutate/IRMutator.cpp @@ -143,7 +143,10 @@ return CurrentWeight ? CurrentWeight * 100 : 1; // Draw a line starting from when we only have 1k left and increasing linearly // to double the current weight. - int Line = (-2 * CurrentWeight) * (MaxSize - CurrentSize + 1000); + int64_t Line = (-2 * static_cast(CurrentWeight)) * + (static_cast(MaxSize) - + static_cast(CurrentSize) - 1000) / + 1000; // Clamp negative weights to zero. if (Line < 0) return 0;