"Cruelty to something that believes it is experiencing pain is not ok," Musk wrote about AI.