Roger Federer beat top-ranked Novak Djokovic, 6-4, 6-4, on Saturday in the semifinals of the Shanghai Masters. Federer, who lost the Wimbledon final to Djokovic, has a chance to win his first title in Shanghai — and his fourth title of the year — against Gilles Simon on Sunday.