(CNN) -- Roger Federer cruised into the quarterfinals of the Toronto Masters tournament with a 7-6 6-3 win over Frenchman Michael Llodra on Thursday.
It earns the former world number one a rematch with Czech Tomas Berdych, who beat him in the quarterfinals to end his reign as Wimbledon champion in a massive upset.
Earlier, seventh seed Berdych continued his fine form this season with a hard-fought 6-3 6-7 6-4 win over Alexandr Dolgopolov of Ukraine.
Federer, who is playing his first tournament since the grass court grand slam, showed he is returning to best form after an early scare.
Llodra went up an early break in the first set, but once Federer drew level it was one-way traffic.
The third seed claimed the subsequent tiebreak seven points to two and early breaks of service in the second put him in command.
Federer, who has slipped behind Rafael Nadal and Novak Djokovic in the rankings, will be intent on revenge when he faces his Wimledon nemesis.
"Playing Berdych is going to bring back memories, some not so nice," he told Sky Sports.
Defending champion Andy Murray survived a second set slump to record a 6-2 0-6 6-3 victory over 15th seed Gael Monfils.
Scot Murray was in total command in the opener but his French opponent hit back with a vengeance as he whitewashed him in the second.
But fourth seed Murray regained his composure and with the injury-hit Monfils receiving treatment for a shoulder problem in the decider, he eased to victory.
Washington champion David Nalbandian is also into the last eight, claiming the scalp of fifth seed Robin Soderling as he claimed his 11th straight victory on the ATP Tour, a personal record.
The Argentine won 4-6 6-4 6-1 as he broke the Swede's powerful service six times, sweeping through the decider after falling a set behind.
Sixth seed Nikolay Davydenko is also out, the Russian beaten 6-3 6-2 by unseeded Frenchman Jeremy Chardy.
World number one Rafael Nadal was playing his last 16 match later Thursday in the night session, taking on giant South African Kevin Anderson.