Existence of weak solutions to the three-dimensional density-dependent generalized incompressible magnetohydrodynamic flows