The Swiss star received a stern test from Berdych in the third-set tiebreaker before prevailing.
"I'm happy today to come through somehow," Federer said in his post-match interview. "I didn't think I was very lucky at the end, but I showed great heart today.
"Tomas really stepped it up and it was a great match at the end, but one guy had to win."
"I think Zverev and Kyrgios are very exciting players -- two of the most exciting players we have on tour right now," Federer said.
Fifth-seeded Spaniard Rafael Nadal and Italy's Fabio Fognini will meet in Friday's other semifinal.