Elon Musk said he has been “sounding the alarm on AI for a long time,” reiterating his longstanding concerns about artificial intelligence.