repair s6 imei on marshmallow safe?

is it safe to downgrade variants of tmobile marshmallow to lollipopto repair imei?