That depends on whether or not the machine has a conscious experience, and we have no way to interact with that question right now.
The reason we care about slavery is because it is bad for a conscious being, and we have decided that it is unethical to force someone to endure the experience of slavery. If there is no conscious being having experiences, then there isn't really an ethical problem here.