Sixth seed Caroline Wozniacki beat Karolina Pliskova 7-5 6-7 (3-7) 6-4 at the Rogers Cup to claim her first win over a world number one.
Wozniacki was 5-1 down in the first set and 4-2 down in the third but recovered to beat the Czech after three hours.
The Dane, 27, will play either American Sloane Stephens or Czech Lucie Safarova in the semi-finals in Toronto.
Simona Halep faces Caroline Garcia and Garbine Muguruza plays Elina Svitolina in the remaining quarter-final matches.