What does Alibaba's IPO mean for Yahoo?

Yahoo's CEO Marissa Mayer has a problem that most executives could only wish for: What to do with a windfall of cash.

Yahoo will sell 27 percent of its stake in Alibaba when the Chinese company goes public Friday. Should the IPO price at $68 a share—which is the top end of what is currently expected—Yahoo's after-tax haul would be $6 billion, according to analysts at B. Riley.

Mayer now has to decide what to do with that cash, and the decision is a critical one as Yahoo continues to struggle with its core ad business.

Yahoo will claim just 5 percent of the U.S. online ad market this year versus 10 percent for Facebook and 38 percent for Google, according to eMarketer.

Yahoo has said at least half of the $6 billion windfall will be returned to shareholders, but the company hasn't said how. Analysts want to see a dividend and bigger buyback.

Read MoreFour-star fund manager passes on Alibaba IPO

"A dividend gets some different types of investors into the stock," said Sameet Sinha, a senior analyst at B. Riley. "They hold onto it for income potential. The share buyback supports the value of the stock in case shareholders decide to sell it."

What about acquisitions?

Mayer has been on a shopping spree since becoming Yahoo's CEO two years ago, buying everything from Tumblr to Summly. Gene Munster of Piper Jaffray said Mayer should be focused on making a play in content, like the one Amazon just did with Twitch.

Read MoreAlibaba's first day at school: What to expect

Either way, Munster said he is sticking with Yahoo because the company will still have a 16 percent stake in Alibaba post-IPO. So the company will keep benefiting from the growth of the e-commerce giant, Munster said.

—By CNBC's Josh Lipton and Mark Berniker