Djokovic had to save four set points on his way to victory over Tallon Griekspoor.
The 14-time champion takes on the Italian Open winner while Andy Murray will play a familiar rival.
Novak Djokovic on Thursday booked his spot in the Geneva semi-finals, putting the world number one within two matches of his first title of 2024, days before his French Open title defence begins.Machac, the world number 44, will be appearing in his first semi-final on the ATP tour.