Tailoring anisotropic magnetoresistance and giant magnetoresistance hysteresis loops with spin-polarized current injection