Andy Murray will face Jo-Wilfried Tsonga in the quarter-final of the Rogers Cup after the Scot's third-round opponent Richard Gasquet pulled out with an abdominal injury.
Frenchman Tsonga earned a shock 6-2 6-2 win over top seed and world number one Novak Djokovic in only 64 minutes.
Third seed Stan Wawrinka lost to Kevin Anderson and fourth seed Tomas Berdych was beaten by Spain's Feliciano Lopez.
Roger Federer moved into the last eight after a win over Croatia's Marin Cilic.
The Swiss world number three, who is aiming for his 80th career title, claimed a 7-6 (7-5) 6-7 (3-6) 6-4 victory and will now face fifth seed David Ferrer, a 1-6 6-3 6-3 winner against Ivan Dodig of Croatia.
|Recent Rogers Cup winners|
|Rafael Nadal (Spain)||2013, 2008, 2005|
|Novak Djokovic (Serbia)||2012, 2011, 2007|
|Andy Murray (Great Britain)||2010, 2009|
|Roger Federer (Switzerland)||2006, 2004|
Murray, 27, is seeking his first title since triumphing at Wimbledon 13 months ago and if he beats Tsonga (not before 18:00 BST on Friday) he could face Grigor Dimitrov, the man he lost to in the quarter-finals of this year's Wimbledon.
Newly married Djokovic, whose last tournament was his five-set win over Roger Federer in the Wimbledon final, came to Canada having won five of his last six Masters events.
But he made 18 unforced errors and dropped serve four times against 13th seed Tsonga for only his fifth defeat of the season.
"I didn't play close to what I intended before going to the court, just nothing was going - no baseline, no serve, no return," said Djokovic.
"It was a very bad day, a very poor performance. Obviously I feel disappointment, and I'm trying to understand what I did wrong."
Wawrinka lost 7-6 (10-8) 7-5 to South Africa's Anderson and Berdych was beaten 3-6 6-3 6-4 by Lopez.
Bulgarian Dimitrov moved into the last eight with a 7-5 5-7 6-4 success against Spain's Tommy Robredo and will now play Canada's Milos Raonic after his 6-3 4-6 6-4 triumph over Julien Benneteau of France.