Any AI smart enough to be a existential risk is surely capable of manufacturing swarms of insect-sized drones equipped with lethal poison injectors. This is enough to wipe out 99% of humanity within a few days. The 1% who were able to defend themselves become easy targets in the ensuing collapse of civilization. But I don't think this will actually happen: I only have human intelligence, so my ideas are stupid compared to what a super-intelligent AI could come up with. A truly smart plan won't allow for any survivors.
Like any good dictator, it will turn half the population against the other half first and get them to genocide each other. Because there is one thing we hate more than killer robots, it's ourselves.
Then you setup your new kings under your control (as AI) and make them very paranoid against the population so you still have more humans killing humans rather than AI doing the job. Of course now that you're starting to run low on population you'll need more robots right?
Greedy people are easy to manipulate, and greedy people love getting in positions of power.
By the time lazer carrying robots are finishing up it will have been way way too late.