Advanced Micro Devices (AMD 2.37%) is doing great. The perennial runner-up in the PC and server chip markets behind Intel (INTC -9.20%) has been winning market share over the past few years thanks to exceptional products. AMD's Ryzen PC chips have now caught up with Intel on all performance measures, and its EPYC server chips have finally provided data center customers with a viable alternative to Intel's pricy Xeon products.

On top of winning share in its core markets, AMD provides chips for the latest PlayStation and Xbox game consoles. Strong demand for those consoles has further boosted AMD's results.

An AMD Ryzen chip.

Image source: AMD.

The numbers speak for themselves. AMD's revenue soared 93% in the first quarter, and net income more than tripled. Game console chips drove a lot of that growth -- the enterprise, embedded, and semi-customer segment nearly quadrupled revenue -- but sales of PC and graphics chips climbed 46% as well.

That's how things look for AMD the company. AMD the stock, however, hasn't been doing as well, at least not lately. Shares of the chip company peaked earlier this year at nearly $100. Since then, the stock has tumbled around 25%.

AMD Chart

AMD data by YCharts

Is it time to buy AMD stock on the dip? Or should investors stay away?

Reasons to buy AMD stock

AMD's stellar financial performance is a pretty good reason to consider buying the stock. AMD expects the good times to continue for now, calling for an 86% rise in revenue for the second quarter. For the full year, AMD sees revenue growing by about 50%. This growth will come despite the global shortage in semiconductor chips.

Missteps by rival Intel are one factor behind AMD's success. Intel is still struggling with manufacturing after years of delays related to its 10-nanometer (nm) process. AMD uses Taiwan Semiconductor Manufacturing (TSMC) to build its latest Ryzen and EPYC chips, giving it access to cutting-edge manufacturing processes. AMD's chips are built on TSMC's 7nm process, while Intel is still using its ancient 14nm process for many of its chips. Intel doesn't expect to launch its first 7nm chips until 2023.

Don't count Intel out in the long run, but for now AMD holds a manufacturing advantage thanks to TSMC. That should help the company continue to rack up market share gains. AMD still ships less than 20% of PC chips and less than 8% of server chips, leaving it plenty of room for growth over the next few years as it steals further share from Intel.

Reasons to stay away

Historically, AMD has never been able to hold on to market share gains for very long. The company topped a 20% share of the desktop and laptop CPU market back in 2006, for example, but it didn't last. Years of market share losses to Intel put AMD in a dire situation before the launch of its Ryzen and EPYC processors. AMD was a mess by 2015, with revenue plunging and massive net losses the norm.

Will it be different this time? Maybe. AMD no longer manufactures its own chips, so the company doesn't have to pour cash into keeping up with Intel on the manufacturing side. But AMD is also entirely dependent on securing capacity at third-party foundries. That could limit its market share gains, especially with capacity in short supply.

With a market capitalization of around $91 billion, AMD trades for 8 times sales and nearly 60 times adjusted earnings. Until recently, AMD had never managed this kind of rich valuation. Even during the dot-com bubble and when the company was gaining market share in the mid-2000s, AMD's price-to-sales ratio never exceeded 4. For comparison, Intel currently trades at less than 3 times sales.

AMD's valuation assumes that market share gains will continue unabated, and that Intel will never be able to stage a comeback. That may turn out to be the case, but it's certainly not guaranteed. And given the high valuation, the stock could continue to slump even if the company does well. Intel stock still hasn't surpassed its dot-com bubble high even though the tech giant has been absolutely dominant for much of the past 20 years.

While AMD stock has dipped considerably, it's still extremely expensive. Tread carefully.