Roger Federer recovered from his shock defeat by Fernando Gonzalez with a 6-4 6-3 win over Russian Nikolay Davydenko in his second Masters Cup group match.
Federer faces Andy Roddick in his last group match on Friday
The world number one showed only flashes of his best but raised his game at the right times to take his win-loss record against Davydenko to 11-0.
Federer faces Andy Roddick in his final group match on Friday.
Roddick became the first player to reach the semi-finals when he crushed Gonzalez 6-1 6-4.
The Chilean never found the blistering form which accounted for Federer on Monday but Roddick was simply stunning.
RED GROUP STANDINGS
Roddick P2 W2 L0 F4 A1 Pts 2
Federer P2 W1 L1 F3 A2 Pts 1
Gonza'z P2 W1 L1 F2 A3 Pts 1
D'denko P2 W0 L2 F1 A3 Pts 0
The American spent a recent injury lay-off working on his general fitness and it showed.
His movement around the baseline and particularly at net was far too much for Gonzalez who was broken three times.
"You have good days where everything feels pretty clean, and this was one of those," said Roddick, who committed only seven unforced errors and did not a break point.
Roddick, who had a match point against Federer at last year's Masters Cup, will go into his next meeting with the world number one brimming with confidence.
"There's no reason for me to be nervous against Roger. I can just go for my shots and try to knock him out," he said.
Federer will surely have to step up a gear if he is to continue his winning run against Roddick, which currently stands at 10 matches.
He was unconvincing against Davydenko and his relief at coming through was evident in his roar of delight when the Russian sent a forehand long on Federer's first match point.
"It's a different situation coming back after losing," he said.
"I tried to get off to a good start. I felt pretty good from the start.
"I don't have the best record on making break points but I create many opportunities so eventually I will break through and break their will."
Federer had been overpowered by a free-hitting Gonzalez on Monday and while that was never likely to happen against Davydenko, it was rarely comfortable.
He was broken by the tenacious Davydenko when serving for the first set and needed two attempts to serve out the match.
He eventually came through after 87 minutes but might be more than a little concerned by his 39 unforced errors - compared to 23 winners.
Davydenko cannot now qualify for the semi-finals following his defeat by Roddick in his opening match.
The world number four follows world number three Novak Djokovic out of the tournament.
"It's not impossible to beat Federer," said the Russian.
"But sometimes it's tough mentally and sometimes physically. Today was really tough for me physically."
ATP Masters Cup, Shanghai, 11-18 November:
Roger Federer (Swi)
Andy Roddick (US)
Nikolay Davydenko (Rus)
Fernando Gonzalez (Chi)
Rafael Nadal (Spa)
Novak Djokovic (Ser)
David Ferrer (Spa)
Richard Gasquet (Fra)